|T O P I C R E V I E W
||Posted - 05 May 2017 : 22:23:01
I'm using UniLabelWL e UniLabelXP controls in a VB6 application.
If I set "WordWrap" and "Autosize" properties to TRUE I get two different results for UniLabelWL e UniLabelXP controls assigning a text to the label.
The first one resizes itself in the same way that Label Microsoft. Instead for UniLabelXP control resize itself with a different height and display a truncated text.
Is there a way to get the same result from UniLabelXP control?
You can see here a sample code. If you click the "Test" button you can see the above.
In addition for UniLabelWL control I get the correct resize (the same that happens with label Microsoft) but if I try to read "Height" and "Width" property after resize I get a wrong value (I suppose the old one).
What am I doing wrong?
You can see the issue in the test code linked above.
Thank you very much.
|3 L A T E S T R E P L I E S (Newest First)
||Posted - 09 May 2017 : 18:42:03
Thank you very much Davide.
I'll try with UniLabelXP last release.
||Posted - 09 May 2017 : 18:21:30
There was a problem in the ctlUniLabelXP widget, now it has been fixed (I've just released revision 54)
I noticed the issue in ctlUniLabelWL when assigning a caption and read the size just after this operation.
I think the behavior is related to the fact that the widget is WindowLess so it doesn't have a so called Device Context (a graphical object that permits Windows API to draw inside) so I can paint the component only in a specific event.
Unfortunately this event doesn't support the resize at the same time and I think this could cause the issue.
Infact if you press your button twice you'll notice that the second time values are correct.
You can fix the second problem in 2 ways:
1- Use a ctlUniLabelXP (now it works as expected)
2- add a "DoEvents" call before reading the size
||Posted - 08 May 2017 : 16:51:19
I'll check it asap; I'll let you know soon