Am I doing something wrong or is this a bug. I need to reset the spin range every time 
I requery a database. 
That means the max rows could change alot. 
 
import pygtk 
pygtk.require('2.0') 
import gtk 
 
def on_window_delete_event(self, *args) : 
        gtk.main_quit () 
def on_button_change_clicked(self, *args) : 
        print 'before value' 
        print spinbutton.get_value_as_int( ) 
        spinbutton.set_range( 0 , 99999 ) 
        print 'after value' 
        print spinbutton.get_value_as_int( ) 
window = gtk.Window (gtk.WINDOW_TOPLEVEL) 
window.set_title ( 'Spinbutton_bug_1.99.16_set_range?') 
vbox = gtk.VBox (0, 0) 
_adj = gtk.Adjustment (100, 0, 100, 1, 10, 10) 
spinbutton = gtk.SpinButton (_adj, 1, 0) 
vbox.pack_start ( spinbutton, 0, 0, 0) 
button_change = gtk.Button ('Change Range') 
button_change.connect('clicked', on_button_change_clicked) 
vbox.pack_start ( button_change, 0, 0, 0) 
window.add ( vbox) 
window.connect( 'delete_event', on_window_delete_event) 
window.show_all ( ) 
print '1 to activate bug press Change Range once' 
print '2 right click on up spinner to set limit at 99999' 
print '3 press Change Range button again and view values.' 
print '4 spin value off by 10 after Change Range.' 
gtk.main () 
 
-- 
______________________________________________
http://www.linuxmail.org/
Now with e-mail forwarding for only US$5.95/yr

Powered by Outblaze
_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to