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

George gambas at ...2377...
Thu Dec 9 18:35:10 CET 2010


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




More information about the User mailing list