Hexagora Forum
Hexagora Forum
Home | Profile | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Other hexagora products
 Programs (Programmi)
 Unicode Controls VB6 - Autosize
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

m.montesi
Novice

Italy
5 Posts

Posted - 05 May 2017 :  22:23:01  Show Profile  Reply with Quote
Hello,
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.
https://1drv.ms/u/s!AvkYVld9-E6Zyn2__KsMIA261cO8

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.

s.dav
Site Admin

Italy
3364 Posts

Posted - 08 May 2017 :  16:51:19  Show Profile  Visit s.dav's Homepage  Reply with Quote
I'll check it asap; I'll let you know soon

Regards, Davide
Go to Top of Page

s.dav
Site Admin

Italy
3364 Posts

Posted - 09 May 2017 :  18:21:30  Show Profile  Visit s.dav's Homepage  Reply with Quote
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

Regards, Davide
Go to Top of Page

m.montesi
Novice

Italy
5 Posts

Posted - 09 May 2017 :  18:42:03  Show Profile  Reply with Quote
Thank you very much Davide.
I'll try with UniLabelXP last release.

Regards.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Hexagora Forum © s.dav Go To Top Of Page
Snitz Forums 2000