Results 1 to 4 of 4

Thread: Strings are sometimes too tall in VB6

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2011
    Posts
    2

    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

  2. #2
    Member aarslan1's Avatar
    Join Date
    Dec 2010
    Location
    Canada
    Posts
    46

    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

  3. #3

    Thread Starter
    New Member
    Join Date
    Apr 2011
    Posts
    2

    Strings are sometimes too tall in VB6

    Controls are Buttons, TextBoxs and Labels

  4. #4
    Member aarslan1's Avatar
    Join Date
    Dec 2010
    Location
    Canada
    Posts
    46

    Wink 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
  •  



Click Here to Expand Forum to Full Width