Labels and colors

BlueVision

Well-Known Member
Licensed User
Longtime User
Hi folks,
I just want to change the color of a label during run. Label is defined as Colordrawable (I like those rounded corners), visible.true, enabled.true.
I set the lables alphavalue to 255

Problem is following:

Case 1:
Mylabel.Color = 200
creates no visible label
Case 2:
Mylabel.color colors.white
this runs, the label gets white backgrund but the rounded corners are gone. And the subset of colors I can use is only a subrange of the colors I can choose in designer. Putting the value into designer directly works also.

What the heck is going on here? Is there something in my general settings I have to change somehow? Searched the forum, found nothing close to my problem.

Any hints?
 

BlueVision

Well-Known Member
Licensed User
Longtime User
Look at the attached sample.

Thanks for replying so fast. As far as I understand your sample, you create a label without the designer, set it to colordrawable and you give it the backgroundcolor of white from the given colorsubset. Am I right?

Ok, this is the basic setting I can initialize via the designer to that label too without coding. But is it possible to change this white then later while program's run dynamically to a color not predefined in the colorssubset, lets say orange?

Cheers BV

And apologize in advance if I misinterpreted your sample, on this end of the line sits a newbie...
 
Upvote 0

BlueVision

Well-Known Member
Licensed User
Longtime User
This works fine with the rounded corners.

Best regards.

Klaus, you made it. That works. I am so stupid, not realizing the given RGB-option. You are absolutely right. For sure there have to be 3 values when not using a given colortable for define RGB. Think I need urgently a break...:BangHead:

Thanks a lot! It's so timeconsuming to manage the own mistakes...
 
Upvote 0
Top