Hexagora Forum
Hexagora Forum
Home | Profile | Active Topics | Members | Search | FAQ
 All Forums
 Other hexagora products
 Programs (Programmi)
 Unicode Controls VB6 - Autosize

Note: You must be registered in order to post a reply.

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert Email Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
   

T O P I C    R E V I E W
m.montesi Posted - 05 May 2017 : 22:23:01
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.

3   L A T E S T    R E P L I E S    (Newest First)
m.montesi Posted - 09 May 2017 : 18:42:03
Thank you very much Davide.
I'll try with UniLabelXP last release.

Regards.
s.dav 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
s.dav Posted - 08 May 2017 : 16:51:19
I'll check it asap; I'll let you know soon

Hexagora Forum © s.dav Go To Top Of Page
Snitz Forums 2000