Automatic Adjustable Label Width

Discussion in 'Questions (Windows Mobile)' started by ceaser, Jul 29, 2008.

  1. ceaser

    ceaser Active Member Licensed User


    I have a little routine that puts a border around my Panels. On my panels I then display all the input text boxes.

    My problem is that I am displaying the Title of the Panel - ie. Coordinate Input, Tachy Survey, Horizontal Alignment, etc. in a Label that sits in the top right corner of the screen. In Visual Studio they call it a frame.

    What must I do so that the width of the Label ajust automatically to the length of the text that is displayed there?:sign0085:

  2. klaus

    klaus Expert Licensed User

    Hi Michael,

    In the ImageLib you have the Keywords
    StringWidth and StringHeight
    They return the number of pixels of a given text in width and height and with this you can adjust your Label.

    Best Regards.
  3. ceaser

    ceaser Active Member Licensed User

    Label Widths

    Thanks Klaus!

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice