[lazarus] How to cast the label of a GTKwidget
Michael Van Canneyt
Michael.VanCanneyt at wisa.be
Fri Apr 23 04:25:51 EDT 1999
On Thu, 22 Apr 1999, Cliff Baeseman wrote:
> Hi everyone,
>
> I have run into a very difficult problem and wonder if anyone else has run into this.
>
> using gtk I have created a button widget using gtk_button_new_with_label('my button');
>
> Now lets say for instance I wish to change the caption on this button. If I where using c i could just cast the button as a gtk_label(button) since most of the objects including
> button decends from label and then use gtk_label_set() to change the text on the button.
This is erroneous: button does NOT descend from label. It HAS a label, as a child,
as I remember from the gtk manual. So the typecast is invalid...
Michael.
More information about the Lazarus
mailing list