[gtkada] Questions
Preben Randhol
randhol at pvv.org
Mon Nov 12 16:30:56 CET 2001
Preben Randhol <randhol at pvv.org> wrote on 12/11/2001 (15:24) :
> Thierry Gabaud <tgabaud at club-internet.fr> wrote on 12/11/2001 (12:08) :
> > c. Access of the labels of button, item finely, radio operator button...
> > to be able to modify them +en run time
>
> procedure Gtk_New
> (Button : out Gtk_Button;
> Label : in String := "");
>
> Create a new button.
>
> if Label is not the empty string, then the text appears in the button
> (and the child of the button is a Gtk_Label). On the other hand, if
> Label is the empty string, then no child is created for the button and
> it is your responsibility to add one. This is the recommended way to put
> a pixmap inside the button.
>
> I suggest that you do that and make Labels you manually pack into the
> buttons. Then you can modify the Labels with Set_Text.
Sorry. I'm misleading you. It should be possible to do:
Child : Gtk_Widget;
Child := Get_Child (Your_Button, 0);
Now Child should contain the Label. Test it. I haven't tried it on
buttons so I don't know if it works.
--
Preben Randhol ------------------- http://www.pvv.org/~randhol/ --
«For me, Ada95 puts back the joy in programming.»
More information about the gtkada
mailing list