Re: tooltips on notbook tabs



One thing should have added is that I am bound to use gtk+ 2.2.4 (suse 9.1).
Can anyone confirm this. Is it still happening with a recent gtk+ version.
if so I'll file a bug-report.

Many thanks,
Stefan

Stefan Kost wrote:
hi hi,

I am trying to add tooltip to ny notbook tabs.
Previously the tabs had just labels:
  label=gtk_label_new(_("pattern view"));
  gtk_widget_set_name(label,_("pattern view"));
  gtk_notebook_set_tab_label(GTK_NOTEBOOK(self),
    gtk_notebook_get_nth_page(GTK_NOTEBOOK(self),1),label);

now I put the label into an event-box first and use this as the tab-label
  label=gtk_label_new(_("machine view"));
  gtk_widget_set_name(label,_("machine view"));
  event_box=gtk_event_box_new();
  gtk_container_add(GTK_CONTAINER(event_box),label);
  page=gtk_notebook_get_nth_page(GTK_NOTEBOOK(self),0);
  gtk_notebook_set_tab_label(GTK_NOTEBOOK(self),page,event_box);
  gtk_tooltips_set_tip(GTK_TOOLTIPS(tips),event_box,
    _("The machines used in the song and their wires"),NULL);

The tooltips work, but the problem is that the label is not shown.

Any ideas?
  Stefan


------------------------------------------------------------------------

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

-- 
http://www.buzztard.org
http://www.sonicpulse.de
http://www.eksor.de


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]