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

Re: TextLabel vanishes when resized


On Fri, 9 May 2025 at 10:37, <066ce286@xxxxxxx> wrote:

> Hi,
>
> I'm trying to make a status bar with a [Text]Label.
>
> I resize it on the Form_Resize() event.
>
> Everything runs fine if 3statusBar" is a Label. But if it is a TextLabel
> it just vanishes.
>
> Any hint ?
>
> (Gambas 3.20.3 )
>
> Public Sub Form_Resize()
>   StatusBar.Width = Me.Width
>   StatusBar.Y = Me.Height - StatusBar.Height - 32
>   StatusBar.X = 0
>   'Print "Status X/Y" & StatusBar.X & " / " & StatusBar.Y & " " &
> StatusBar.Width & " x " & StatusBar.Height
>   'StatusBar.Text = "Status X/Y" & StatusBar.X & " / " & StatusBar.Y & " "
> & StatusBar.Width & " x " & StatusBar.Height & " computed Y=" & (Me.Height
> - StatusBar.Height - 32)
> End


Maybe the textlabel becomes too small to show the default html text size?

I would not try to adjust it's height/width manually and just set
.AutoResize to true on the TextLabel
Then just use..
  StatusBar.Y = Me.Height - StatusBar.Height - 32

Respects
BruceS

Follow-Ups:
Re: TextLabel vanishes when resized066ce286@xxxxxxx
References:
TextLabel vanishes when resized066ce286@xxxxxxx