Re: GtkMenu popup ?
| From: | Steph | Date: | Thu, 12 Apr 2001 07:01:39 +0000 |
| Subject: | Re: GtkMenu popup ? | ||
| References: | 1 | Groups: | php.gtk |
| Request: | Send a blank email to php-gtk+get-1353@lists.php.net to get a copy of this message | ||
Hey hey Markus, I got an error message out of popup!!!!!
It complained about not having a parent window.
Show() in the same space worked ....
I presume therefore that you need to set up parent/child relationships somehow for popup to work.
----- Original Message -----
From: "Markus Fischer" <mfischer@josefine.ben.tuwien.ac.at>
To: <php-gtk@lists.php.net>
Sent: Thursday, April 12, 2001 2:15 AM
Subject: [PHP-GTK] GtkMenu popup ?
Hi,
Anyone got GtkMenu popups successfully running ?
I guess its really a gtk+ problem on my own, but maybe soneome
has an idea why the popup does not work ?
<?
dl( 'php_gtk.' . (strstr( PHP_OS, 'WIN') ? 'dll' :
'so'));
$w = &new GtkWindow();
$w->connect( 'delete_event', create_function( '',
'Gtk::main_quit();'));
$b = &new GtkButton( 'Press me');
$b->connect( 'clicked', 'showpopup');
$w->add( $b);
$w->show_all();
$m = &new GtkMenu();
$mi = &new GtkMenuItem( 'Entry 1');
$m->add( $mi);
$mi = &new GtkMenuItem( 'Entry 2');
$m->add( $mi);
$m->show_all();
Gtk::main();
function showpopup() {
global $m;
// $m->popup( 1, 0);
$m->popup( 1, mktime());
}
?>
Following the docs it should work, or did I missed something ?
thanks for any help
Markus
--
Markus Fischer, http://josefine.ben.tuwien.ac.at/~mfischer/
EMail: mfischer@josefine.ben.tuwien.ac.at
PGP Public Key: http://josefine.ben.tuwien.ac.at/~mfischer/C2272BD0.asc
PGP Fingerprint: D3B0 DD4F E12B F911 3CE1 C2B5 D674 B445 C227 2BD0
--
PHP GTK Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-gtk-unsubscribe@lists.php.net
For additional commands, e-mail: php-gtk-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net