[Gambas-user] Gambas-user Digest, Vol 44, Issue 46
Aaron Peachey
alpeachey at ...626...
Tue Jan 19 20:37:00 CET 2010
> Erm... have you tried putting text in the label's Caption property,
> set its width and X, Y location so that it is within the visible area
> of the form, yes?
>
> No, you haven't?
>
> There's your problem then, hey. The field has no text so it can't be
> seen, even if it is hiding behind the window title-bar.
>
> Also, lose lblName.Show().
>
> Regards,
>
>
Thanks. My code did originally have lblName.Text and lblName.X/lblName.Y
set but it still didn't show anything.
i.e. this code results in an empty form:
DIM lblName AS Label
lblName = NEW Label(ME)
lblName.Text = "Test"
lblName.X = 100
lblName.Y = 100
However, I have just tried Doriano's suggestion:
DIM l AS Label
l = NEW Label(ME)
l.Text = "Ciao"
' l.AutoResize = TRUE ' alternative: use this and omit width+height
l.Width = 50
l.Height = 20
And this did the trick. It placed the label at the top left corner of the form (under the titlebar)
thanks for your help..I'm sure I'll be posting again soon!
Aaron
More information about the User
mailing list