guile-gtk-general
[Top][All Lists]
Advanced

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

Re: dynamically changing the label-text of a menuitem


From: David Pirotte
Subject: Re: dynamically changing the label-text of a menuitem
Date: Mon, 26 Dec 2005 22:38:04 +0100

On Tue, 27 Dec 2005 07:17:21 +1100
Kevin Ryde <address@hidden> wrote:

> David Pirotte <address@hidden> writes:
> >
> > in order to change the label text of a menu item, FAQ and C code I
> > could find on the net propose to do it through the label child of
> > the superclass gtkbin of the menu item :-)
> 
> The last one I did I think I kept the label widget from when building
> the menu, and just kept using it.  (It was a label displaying a title,
> not a button.)

Yes, I would 
but right now I am using glade to build the interface 

> > but I couldn't access the gtkbin, what is the accessor for it?
> 
> gtk-container-children, as for any subclass of GtkContainer.  Gtk 2
> also has gtk-bin-get-child, I define that for myself in 1.2 with the
> following (not bothering with any type checking),
> 
>       (define-public (gtk-bin-get-child bin)
>         (first (gtk-container-children bin)))

Great! here is what I did, which works nicely:

        (set-text  (get-child (get-widget *glade-xml* "fichier1"))
                ;; (_ "File")
                "Bibi"
               )

thanks Kevin
david




reply via email to

[Prev in Thread] Current Thread [Next in Thread]