|
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.
|