Results 1 to 4 of 4

Thread: [RESOLVED] Length of a Label

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2010
    Posts
    2

    Resolved [RESOLVED] Length of a Label

    Hello there!
    I am writing an application, where i have a Label. This label, resizes accoording to the UserControl, which itself resizes when the application window changes size.
    In this Label, I enter some text, in a single line (that's a must).
    What i have problem figuring out, is how to be able to aquire the maximum number of characters that i can put into the label, in a single line.
    Now there are 2 problems with this:
    1) The label does not have a fixed width.
    2)The width property returns width in pixels, not characters.

    Autosize would not be an option for me, since the label must be of the same width as the application window.

    I'm pretty sure that there must be a hack around this, but i can't think of any at the moment.

    Any ideas would be appreciated!

    Thanks,
    S.K

  2. #2

  3. #3

    Thread Starter
    New Member
    Join Date
    Jan 2010
    Posts
    2

    Re: Length of a Label

    Thanks RhinoBull

    That worked exactly as i wanted it to...

  4. #4

Tags for this Thread

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