Re: ToggleButton Label.
- From: yanxin <ycui wmsvision com>
- To: Harring Figueiredo <harringf yahoo com>
- Cc: gtk-app-devel-list gnome org, glade-users ximian com
- Subject: Re: ToggleButton Label.
- Date: Wed, 11 Sep 2002 14:44:25 -0700
method 1:
1)find the GtkToolbarChild(i.e. call it 'child') in the list
GTK_TOOLBAR(toolbar)->children by using the returned 'start_toogle'
2)child->label is the label you want
method2:
1)create a cutomize button with icon and label inside
2)put the button into toolbar by calling: gtk_toolbar_append_widget()
2)find the label widget you want
Harring Figueiredo wrote:
Folks,
I have posted this question a while back, and, though, I got some answers,
none worked for me.
Here is the problem:
I created a toggled button on a toolbar using glade-2. The Toggle button has
an icon and a label - I want to change the label once the button has been
toggled.
(Yes, in glade "1", the same problem occurs."); Also, I can not "name" name
label and call lookup_widget as the label is not accessed trough glade -- or
through the interface.c since it is contructed with the call:
start_toogle = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar1),
GTK_TOOLBAR_CHILD_TOGGLEBUTTON,
NULL,
"Start",
NULL, NULL,
tmp_toolbar_icon, NULL, NULL);
Now, I think that the button contains a VBox to which the icon and the label
are added.
I am thinking about navegating the children on the VBox to find the label. But
before doung this, I would like to make sure there is an easier way to do this
!!! (there must be!)
Thanks for your help.
BTW: For the people that replied to the message I posted before, here is the
error I get: ( As the error indicates, I know that I have a GtkVBox on the
button.)
================ ERROR =================================
(cdstation:11029): GLib-GObject-WARNING **: invalid cast from `GtkVBox' to
`GtkLabel'
(cdstation:11029): Gtk-CRITICAL **: file gtklabel.c: line 909
(gtk_label_set_text): assertion `GTK_IS_LABEL (label)' failed
__________________________________________________
Yahoo! - We Remember
9-11: A tribute to the more than 3,000 lives lost
http://dir.remember.yahoo.com/tribute
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]