Re: change tooltip on the fly

From: Date: Sun, 08 Jan 2006 22:36:31 +0000
Subject: Re: change tooltip on the fly
Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-6510@lists.php.net to get a copy of this message
Tooltips only display when 'their' widget has keyboard focus. It sounds as though, by using a timer, you're actually trying to get it to change messages regardless of its focus state. You're confusing the poor thing :) This works fine... <?php function set_tooltip($button, $event, $tooltips, &$x) { $x++; $tooltips->set_tip($button, "Tooltip has been re-set $x times"); return; } $window = new GtkWindow(); $window->set_title('Tooltips test'); $window->connect_simple('destroy', array('gtk', 'main_quit')); $button = new GtkButton('Reset tooltip'); $tooltips = new GtkTooltips(); $tooltips->set_tip($button, "Press button to re-set tooltip"); $tooltips->set_delay(10); $x = 0; $button->connect('enter_notify_event', 'set_tooltip', $tooltips, &$x); $window->add($button); $window->show_all(); Gtk::main(); ?> "Brian A. Stumm" <bs@bs-linux.com> wrote in message news:Pine.LNX.4.33.0601081357320.15321-100000@bs-linux.com...
Anyone have a recommendation for changing a tooltip message on the fly? My attempt to do this results in a wonky tooltip that will rarely display and when it does it goes away almost immediately... I'm trying to change the text once a second in a function registered in the add timeout way. then I use: $tooltips->set_tip( $eventbox, $msg, NULL); $tooltips and $eventbox are global within the function. Thanks for any pointers. -- PHP-GTK General Mailing List (http://gtk.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __________ NOD32 1.1356 (20060108) Information __________ This message was checked by NOD32 antivirus system. http://www.eset.com


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