[pygtk] scaling in slider

Sibtey Mehdi sibteym at chetu.com
Tue Mar 24 19:08:40 WST 2009


Hi all
         i am newbie to pygtk i am trying to add the slider in my application. i want the increment shuold be like   
        2,4,8,16, 32,64.how can i do this.  i am doing by this way but it is not working fine.
                x = 1
                adj = gtk.Adjustment(1,1, 64, 2, 2, 0)
                hscale = gtk.HScale(adj)
               hscale.connect("value_changed", cb_digits_scale)
 
          def cb_digits_scale(hscale):
                    x = adj.get_value()
                   value = x*2
                   adj.set_value(value)

can anyone suggest me?

Sibtey 

 

 

 

 


                  
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.daa.com.au/pipermail/pygtk/attachments/20090324/5a22c7cf/attachment.htm 


More information about the pygtk mailing list