Re: tooltips on notbook tabs
- From: Stefan Kost <kost imn htwk-leipzig de>
- To: gtk-app-devel-list gnome org
- Subject: Re: tooltips on notbook tabs
- Date: Wed, 08 Sep 2004 13:54:13 +0200
Fixed the first part of the problem myself. See below ..
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"));
adding
gtk_widget_show(label);
does the trick. Can anyone enlighten me when I have to manually show widgets and
when gtk_widget_show_all(); is enough.
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.
But now I face the probelm, that the inactive tool-bar tabs are drawn with a
bright background in there. Before the were darkened. I thought the event box is
invisible?
Any ideas?
Stefan
Stefan
--
\|/ Stefan Kost
<@ @> private business
+-oOO-(_)-OOo------------------------------------------------------ - - - - -
| __ Address Simildenstr. 5 HTWK Leipzig, Fb IMN, Postfach 301166
| /// 04277 Leipzig 04251 Leipzig
| __ /// Germany Germany
| \\\/// Phone +49341 2253538 +49341 30766101
| \__/ EMail st_kost_at_gmx.net kost_at_imn.htwk-leipzig.de
| WWW www.sonicpulse.de www.imn.htwk-leipzig.de/~kost/about.html
===-=-=--=---=---------------------------------- - - - - -
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]