On Sat, 23 Jun 2001, Steve McClure wrote:
> > On Fri, 22 Jun 2001, Steve McClure wrote:
> >
> > > I'm trying to change the adjustment for a dial to parameters specified
> > > by the user, I do:
> > >
> > > def setDialRange(widName, min, max):
> > > w = app.wtree.get_widget(widName)
> > > adj = w.get_adjustment()
> > > if adj.lower != min or adj.upper != max:
> > > adj.lower = min
> > > adj.upper = max
> > > w.set_adjustment(adj)
> > >
> > > but the widget doesn't change it appearance. I have also tried calling
> > >
> > > adj.changed() in place of and in addition to
> > > w.set_adjustment(adj)
> > >
> > > Any pointers would be appreciated.
>
> No change. Wouldn't that happen anyway the next time the value is changed on
> the dial?
Sorry. The correct fix is the following:
adj = w.get_adjustment()
adj.set_all(adj.value, min, max, adj.step_increment,
adj.page_increment, adj.page_size)
# set_adjustment not necessary
Assigning to the lower and upper attributes does nothing (other than
adding the attributes to the instance dict).
James.
--
Email: [EMAIL PROTECTED]
WWW: http://www.daa.com.au/~james/
_______________________________________________
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk