Ver 1.90 Designer Scripts

rfresh

Well-Known Member
Licensed User
Longtime User
Ver 1.90 Designer Scripts - BG Color Needed

@Erel

Here is a good example of why we need Label BG color support in the Deisgner Scripts window. The attachment shows two problems, one of which would not be known unless we could set the BG of a Label to see it.

(1) The BG color shows that the label.Text Vertical_Center property is not working. The text is not centered vertically as we think it is from the setting. One might not ever know this wasn't working without the ability to set a BG color.

(2) Part of the end of the text is cut off. Yes, we can see that with or without BG color but with BG color we can easily see that the label width is not wide enough.

Note:

In my main module I added this line to center the text vertically:

B4X:
lbl_Test2.Gravity = Gravity.CENTER_VERTICAL

but it doesn't correct it... is that the correct command to center the text vertically?
 

Attachments

  • 1.jpg
    1.jpg
    66.9 KB · Views: 253
Last edited:

Ricky D

Well-Known Member
Licensed User
Longtime User
I'm guessing it'd be CENTER_HORIZONTAL

you want

regards, Ricky
 
Upvote 0

rfresh

Well-Known Member
Licensed User
Longtime User
No, CENTER_HORIZONTAL works correctly: it centers the text in the center of the label component; ie, centers it from a left/right stand point.

CENTER_VERTICALLY should center the text from a top/bottom stand point, regardless of what the .Height is of the label.
 
Upvote 0

rfresh

Well-Known Member
Licensed User
Longtime User
I see. So it's trying to center it vertically (and in fact it is), but the font is too large for the label height, so it looks like it isn't working. Damn, so many things to look at. Thanks...
 
Upvote 0
Top