Automatic Adjustable Label Width

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

  1. ceaser

    ceaser Active Member Licensed User

    Hi

    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:

    Thanks
    Michael
     
  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!

    Regards
    Michael
     
Loading...
  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