Re: "delay" in widget->sensitive

On Jun 25, 2008, at 5:40 PM, Torsten Schoenfeld wrote:

anguila wrote:
When I switch between a 0= widget->is_sensitive() to a widget- >sensitive(1), the widget is put to sensitive(1) when my mouse touch this widget. How can I
set inmediatly this widget to activated mode?

I think $widget->set_sensitive(TRUE) should do the trick.
$widget->sensitive(TRUE) just sets an internal flag and does nothing more to
actually change the widget's appearance.

The usual caveat about "you must wait for the main loop to run for this to have any visible effect" applies, as the redraw is done in an idle.

Also, if your mouse button is sitting inside the button's rectangle when the call to set_sensitive() happens, there's a long-standing bug that causes the visual update not to happen until you move out and come back in.

Leia/Lois:  Aren't you a little fat for a stormtrooper?
Luke/Chris: Well, stay here and rot, you stuck-up bitch.
  -- Family Guy, "Blue Harvest" (A "Star Wars" parody)

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