Re: $widget->visible() not behaving




On Jul 5, 2004, at 10:29 PM, Daniel Kasak wrote:

Daniel Kasak wrote:

Bug?

Actually, it's not limited to $widget->visible().
It also happens with $widget->sensitive().

not a bug, you're misusing those methods.

visible() and sensitive() are bindings for the corresponding flag values of the gtk widget. only the widget implementation has any business *setting* those values, and that usually happens deep within the implementation at that. you can read the values at any time, but doing so is not really a good idea. the flag values represent a cached version of the widget's state; the actions that correspond to them are driven by separate methods.

the visible flag is toggled deep within the machinery of Gtk2::Widget::show() and Gtk2::Widget::hide(), and you should *only* use those functions to show or hide a widget.. you can check whether a widget is visible with Gtk2::Widget::visible or by reading the 'visible' property.

the sensitive flag is toggled by Gtk2::Widget::set_sensitive(), and should be retrieved by Gtk2::Widget::get_sensitive(). there is also a 'sensitive' property.

--
Eight, eight, eight, eight ounces to gooooo, you're gonna be sedated!
  -- Elysse, singing while feeding rice cereal formula to
    fussy infant Yvonne




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]