Re: button not reappearing



Quoting Ross McFarland <rwmcfa1 neces com>:
 
what kind of event handler is the $button->set_visibility(1) call being
made in? check that you have the correct return behavior for this type
of callback, not doing so can cause unpredictable things to happen.

if that isn't it, then try this. it is not really a solution, but
something to try to see if it fixes things in hopes of narrowing down
the problem, try placing:
while( Gtk2->events_pending )
{
      Gtk2->main_iteration;
}
immediately after the call where you set_visibility(1).

i have done things very similar to what you seem to be trying to do in
apps with Gtk2-Perl before and things worked fine so without more
information and/or seeing the relevant code that's about the best
guesses i have.



sorry, i forgto the code was online hidden away somewhere...

======================
sub on_mencoder_output_show_button_clicked
{
        $::widgets->{'mencoder_output_frame'}->show_all;
        $::widgets->{'mencoder_output_show_button'}->hide;
}                
        
sub on_mencoder_output_hide_button_clicked
{
        $::widgets->{'mencoder_output_show_button'}->show;
        $::widgets->{'mencoder_output_frame'}->hide;
}
======================

And I also didn't say it was gtk2, my bad... (and not set_visibility,...doh!)

well these are the two callbacks, one for each button running on a click event,
so there's no outstanding events possible afaik, the interface is repsonding
absolutely fine, and i also have an idle callback to go through events pending
too. it's all so so basic... but the button just doesn't show until the mouse
goes over it.... i can't think of anything to do!

thanks

chris


-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/



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