|
-
Apr 11th, 2011, 06:54 AM
#1
Thread Starter
New Member
Strings are sometimes too tall in VB6
My problem is that in visual Basic application Strings are sometimes outside of control which they are meant for..........is there a way to programmatically to identify size of UI-component and the length of string concerned that UI-component so I know which strings are too tall to the component in question
BR Jarppa
-
Apr 11th, 2011, 07:06 AM
#2
Member
Re: Strings are sometimes too tall in VB6
That depends on the type of control you're using. I request you to kindly mention what type of control you're concerned about?
For example if you're using Label Control, You might need to turn on the
'wordwrap' and 'autosize' properties too true for a label to autosize itself and wrap the contents according to its size.
If you mention a bit more information about your problem it will be easy for us to help you.
Thinking And Saying Java is great because it works on All operating Systems is same as saying Anal is good because it works on all genders - By Arslan
-
Apr 11th, 2011, 08:16 AM
#3
Thread Starter
New Member
Strings are sometimes too tall in VB6
Controls are Buttons, TextBoxs and Labels
-
Apr 11th, 2011, 09:05 AM
#4
Member
Re: Strings are sometimes too tall in VB6
Have A Look Here For Controlling Height of Text Boxes, For labels, try to set the wordwrap and autosize properties to true.
(Note: You MUST set the wordwrap property to TRUE before Setting the autosize property to true, or else the text will go past the form width).
The same logic (Given in the link) can be applied to Buttons (Though its rare that somebody set text at runtime for a button). The example given is using Control Arrays.
------
Another simplest logic is for buttons calculate Len(Command1.Caption) And then Set the controls size (in twips) accordingly.
Thinking And Saying Java is great because it works on All operating Systems is same as saying Anal is good because it works on all genders - By Arslan
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|