GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Thu Apr 24, 2014 12:17 am

All times are UTC




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: on gtk tooltips
PostPosted: Wed Nov 02, 2005 6:05 pm 
Offline

Joined: Wed Nov 02, 2005 5:59 pm
Posts: 1
hi, i am very new using gtk and i need some help putting on tooltips on my images...
i have this:

GtkWidget *image = gtk_image_new_from_file ("filename.png");

GtkTooltips *itemTips = gtk_tooltips_new();
gtk_tooltips_set_tip (GTK_TOOLTIPS (itemTips),image,
"Action Item",
"Item View");

however, according to the documentation, i have to make an Event Box for this to work since image is a widget without windows. I am not sure how to work with eventboxes, can someone help me? I tried using it but when i was able to put on tooltips, all the other eventhandlers that i've put on my image (like on_mouse_click, etc.) disappears! my image loses its functionalitY! i also have this:

GnomeCanvasItem *actionItem = gnome_canvas_item_new (m_root,
gnome_canvas_widget_get_type (),
"widget", image,
"x", 20.0 + ( i * 60 ),
"y", 30.0,
"width", 50.0,
"height", 50.0,
"anchor", GTK_ANCHOR_NW,
"size_pixels", FALSE,
NULL);

where i draw my widget in a GnomeCanvasItem. please help, anything would be greatly appreciated. thanks in advance.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group