Re: Help with Dialog/Popup

From: Date: Wed, 03 Aug 2005 18:16:23 +0000
Subject: Re: Help with Dialog/Popup
References: 1 2  Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-6147@lists.php.net to get a copy of this message
Thanks Christian, that got me a bit further. Here is what is going on now. I have the following code: $popup = new GtkWindow(GTK_WINDOW_DIALOG); $label = new GtkLabel("Message goes here"); $label->show(); $popup->set_usize(300,150); $popup->set_position(GTK_WIN_POS_CENTER); $popup->add($label); $popup->show_all(); while(gtk::events_pending()) gtk::main_iteration(); sleep(5); //this will be replaced with the function that does the real work $popup->destroy(); Now the window appears for the 5 seconds, but the label is never drawn within it. I'm also not sure if this is the proper usage of gtk::events_pending() as the documentation confused me a bit... Thanks, Neil Quoting Christian Weiske <cweiske@cweiske.de>: > Hello Neil, > > > > dialog box disappear when the function is done. Currently, not matter what > I > > do, the dialog box does not appear until after the action is complete and > is > > destroyed immediately. Is there any way I can accomplish this kind of > > functionallity with php-gtk? > > You don't give the system enough time to display. > Search for gtk::events_pending in the wiki or the docs. > > > Regards/MfG, > Christian Weiske > -- > XMMS is playing now: > >

« previous php.gtk.general (#6147) next »