[lazarus] How to cast the label of a GTKwidget
Cliff Baeseman
vbman at pcpros.net
Fri Apr 23 00:52:36 EDT 1999
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.
I am using some casting in gtk now but this allways returns nil? gtk_label(button). The button does exist because I can see it on the window and check of the button assignment is
showing ok.
I have also tried this with other decendant widgets. If the widget that I cast is in fac a label the cast will work and the label will be set.
How can I cast these widgets.
Cliff Baeseman
leej at logica.com wrote:
> snapshots: reminder -latest win32 + ide updates now on tflily /snapshot NB these snapshots are daily where possible, see /snapshot/*.txt readme files for latest versions & status
>
> _______________________________________________
> fpc-pascal maillist - fpc-pascal at vekoll.saturnus.vein.hu
> http://vekoll.saturnus.vein.hu/mailman/listinfo/fpc-pascal
More information about the Lazarus
mailing list