[Gambas-user] BUG: Textlabel contents not displaying when value changes from ""

Benoît Minisini gambas at ...1...
Sat Jan 1 19:54:34 CET 2011


> I'm using a Textlabel with Transparent = True.  This displays a
> numeric value that can change while the program is being used.  If the
> value is zero, it displays nothing (.text = "").
> 
> The problem is that if the control has no .text value, and is then
> given one, it does not display.  If the value changes (e.g. from "1"
> to "2"), the change is reflected.  I tried changing the code so that
> it sets the text value to " " (space) instead of "", but that did not
> help.  If I set Transparent = False it works correctly.  The textlabel
> is over a picturebox, but that is not the problem; if I move it to
> another part of the form it has the same behavior.  I also tried
> performing a .Raise after updating the value, but that did not help.
> 
> What I ended-up doing in my code was to always load a value, even if
> zero, and set the .Visible property based on whether or not it was
> zero.  This solved my issue, but I wanted to report the bug.  I'm
> running version 2.22
> 
> -George
> 

That bug should be fixed in revision #3421.

Regards,

-- 
Benoît Minisini




More information about the User mailing list