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

Re: TextLabel vanishes when resized


BTW the TextLabel does not vanish anymore, with the same code.
Maybe yesterday I should have restarted Gambas.

----- Mail original -----
> De: "Bruce Steers" <bsteers4@xxxxxxxxx>
> À: user@xxxxxxxxxxxxxxxxxxxxxx
> Envoyé: Vendredi 9 Mai 2025 11:46:41
> Objet: 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
> 


References:
Re: TextLabel vanishes when resizedBruce Steers <bsteers4@xxxxxxxxx>