|Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread|
|Messages 1 to 6 of 6 total|
|TLabel content height|
|Mon, Feb 11 2013 10:55 AM||Permanent Link|
Is there a way I can determine the height of the content of a TLabel? I am
obtaining the content from a source I don't control, which may have anything from
one word to several lines of text, possibly with <br> breaks. I need to move other
controls to below the text so it looks nice - I don't want lots of white space for
small content. There appears to be no way to have it auto-size downward or to tell
me how big the content is, as opposed to the height of the label which may be
Is there some browser function I can call to find out how big the content actually
|Mon, Feb 11 2013 11:46 AM||Permanent Link|
FWIW, this applies to TRadioButtons too. I need to know the height that the radio
button should be with long text.
|Tue, Feb 12 2013 3:20 AM||Permanent Link|
>>Is there a way I can determine the height of the content of a TLabel? I am
>>obtaining the content from a sourceThere appears to be no way to have it auto-size downward or to tell
>>me how big the content is, as opposed to the height of the label which may be
This works fine for me. I'm building a GUI at run-time and need to position sequentially "down the page" as you suggest. I create my TLabels with AutoSize = True and WordWrap = True. Setting the Caption or Font.Size changes the Height property allowing me to position accordingly.
|Tue, Feb 12 2013 4:46 AM||Permanent Link|
TVM, I will experiment further. So you set it to autosize and wordwrap, then set
the width? Autosize at design time causes the width to shrink.
If you have a code snippet, I'd appreciate it, but I will experiment here too. So
far I'm loving the whole EWB thing.
|Tue, Feb 12 2013 6:47 AM||Permanent Link|
Okay, you are quite right. Although Autosize sets the size to the label text at
design time, if you then resize it and set the text, it does update the height at
run time. I've added code to set the width properly in case the IDE decides to
mangle it, but this works well. Now to work on the radio buttons...
|Tue, Feb 12 2013 8:08 AM||Permanent Link|
> Now to work on the radio buttons...
Okay, can't do it with this - no auto-size or word-wrap property to set. This would
be a nice enhancement for future updates...