Results 1 to 4 of 4

Thread: Width of a label to view the caption on 1 line

  1. #1

    Thread Starter
    Member
    Join Date
    Apr 1999
    Posts
    38

    Post

    Does anybody know how you can find out what width a label must have to view the caption of the label on 1 single line.

    The caption is filled in in runtime, and I need to know to which value I must set the width property.

    I can't set it to a high value, because I want to place another control immediately next to it.

  2. #2
    Lively Member
    Join Date
    Mar 1999
    Posts
    93

    Post

    Try to set label's Autosize property to True and forget about calculating it's width

  3. #3

    Thread Starter
    Member
    Join Date
    Apr 1999
    Posts
    38

    Post

    That is a solution, but then there's still another problem:

    I want to place another control immediately next to it. How do I know it's Left property ?

  4. #4
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845

    Post

    make your other control's left value = TheLabel.left + TheLabel.Width

    ------------------
    Mark Sreeves
    Analyst Programmer

    [email protected]
    A BMW Group Company



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