cursors and eventboxes
| From: | firepage | Date: | Sat, 04 Jan 2003 07:11:37 +0000 |
| Subject: | cursors and eventboxes | ||
| Groups: | php.gtk.general | ||
| Request: | Send a blank email to php-gtk-general+get-2837@lists.php.net to get a copy of this message | ||
Hi, I am here again
I was trying to make a clickable link out of a GtkLabel & have managed that to a point (i.e. it
works)
$label= & new GtkLabel('blah')
$ebox = &new GtkEventBox();
$ebox->set_events(GDK_BUTTON_PRESS_MASK|GDK_ENTER_NOTIFY_MASK|GDK_LEAVE_NOTIFY_MASK);
$ebox->connect('button-press-event',array(&$this,'e_hit));
$ebox->connect('enter-notify-event',array(&$this,'e_in'));
$ebox->connect('leave-notify-event',array(&$this,'e_out'));
$ebox->add($label);
but I would really like to set the cursor to a hand (or whatever) on mouseover of the event box.
I looked at the cursor code in the example gtk.php file but just got more confused as the
set_cursor() function appears to call itself ? or is there a Gtk method for set_cursor() ?if so I
cant find it , basically I am as confused as usual ;)
...gtk.php...
function set_cursor($spinner, $darea, $cur_name)
{
$c = $spinner->get_value_as_int();
$c = $c & 0xfe;
$cursor = gdk::cursor_new($c);
$window = $darea->window;
$window->set_cursor($cursor); /* cant seem to find set_cursor() in the manual ? */
$cur_name->set_text($cursor->name);
}
errr one more thing ! , if I want to underline the text in GtkLabel.... do I have to count chars and
set_pattern($set of lines) ? is there an easier way ?
Regards
Simon Wheeler
firepages
firepages :: PHP/*SQL/Perl/Python/CDML/C++/C#/GTK/*NIX or Win32
data mining&divining/website design, hosting & DNS services
http://firepages.com.au :: http://firepages.org
Mob :: 0403358160 [preffered]
Ph :: (+61) 8 94192175
Fax :: no faxes please
general :: simon@firepages.com.au
hosting :: host@firepages.com.au
phpdev related :: phpdev@firepages.org
firepages :: ABN 65 991 214 711