Re: $widget->visible() not behaving



muppet wrote:

<snipped>

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.

Thanks.
And sorry about that...

--
Daniel Kasak
IT Developer
NUS Consulting Group
Level 5, 77 Pacific Highway
North Sydney, NSW, Australia 2060
T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989
email: dkasak nusconsulting com au
website: http://www.nusconsulting.com.au
Title: CanIt Vote for ID 63736

The following links have been inserted by the NUS Consulting internal spam filter and are for NUS Consulting staff only
Spam
Not spam
Forget previous vote


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