Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread Autosize labels
Tue, Oct 20 2015 10:04 AMPermanent Link

Matthew Jones

Here's a minor regression from EWB1.

Create a form, put on a button and a label. The label is in AutoSize
true by default.

In the button click event, put:

   Label1.Caption := 'Hello' + #13 + #10 + 'mum';

Run the project, and click the button. You will find that the text is
now "Hello". If you inspect this, the full text is indeed there.

Now change the code to:

   Label1.Autosize := false;
   Label1.Caption := 'Hello' + #13 + #10 + 'mum';
   Label1.Autosize := true;

It is now displayed as expected. I use a lot of multi-line labels, so
this is a tad awkward. Actually, it also works if the false is after
the assign, so I could scan the form and do this to any label. Hmmm.

--

Matthew Jones
Tue, Oct 20 2015 1:58 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Matthew,

<< Run the project, and click the button. You will find that the text is now "Hello". If you inspect this, the full text is indeed there. >>

There's a bug in the auto-size optimization done for 2.02 - it fails to account for non-word-wrapped text that contains embedded CRLFs.  It also affects the century display of the TCalendar/TDateEditComboBox/etc controls.

A fix will be in 2.02 B2.

Tim Young
Elevate Software
www.elevatesoft.com
Image