Results 1 to 3 of 3

Thread: lable autosiz????

  1. #1

    Thread Starter
    Frenzied Member avrail's Avatar
    Join Date
    Mar 2006
    Location
    Egypt, Cairo
    Posts
    1,221

    lable autosiz????

    here is my problem, i have to creat a label in the runtime on a pocket pc program , and this label will carry data from a databse, i want this label autosize i try to search for this proberty on the propertes window for the pocket pc but i didnt found it, i was thinking it will be like vb6
    by the way i try
    label1.text = "hello! /r/n i love vbforums.com"
    this make the line on 2 lines, but only the first line appear, sure i need to resize the label but how?

    Last edited by avrail; Apr 9th, 2007 at 12:06 PM.
    You Don't Have to Rate Me.
    I'm Not a Civilized Man I'm the Civilization it self
    White or Black, Living or Dieing and 0 or 1 that's MY life
    iam an Object in Object Oriented Life
    my blog : http://refateid.blogspot.com/
    twitter :@avrail
    010011000111010101110110001000000100110101111001001000000101000001100011

  2. #2
    Hyperactive Member drattansingh's Avatar
    Join Date
    Sep 2005
    Posts
    395

    Re: lable autosiz????

    If you're using the framework 2.0, i.e. visual studio 2005, ther's the autosize property:

    label1.Text = " dfsdfsdfds sdfsdfdsf dsfds fsd \r\nfdsf dsf dsf dsf dsfds fds fds fsd fds fdsf sdf";

    label1.AutoSize = true;


    This auto size property will set the size around the test. \r\n is to create a new line.

    I tried doing something like this with visual studio 2003, but it didn't work as I wanted. I know that there is a way to do it with vs2003, but since vs2005 came out I never bothered to find out.

    Hope that this helps.

    Jennifer

  3. #3

    Thread Starter
    Frenzied Member avrail's Avatar
    Join Date
    Mar 2006
    Location
    Egypt, Cairo
    Posts
    1,221

    Re: lable autosiz????

    Jennifer, thx for your help, but really i know that /r/n will break the line i try it
    but this didnt work on the pocket pc it just break the line and the 1st line appear and the second didnt
    You Don't Have to Rate Me.
    I'm Not a Civilized Man I'm the Civilization it self
    White or Black, Living or Dieing and 0 or 1 that's MY life
    iam an Object in Object Oriented Life
    my blog : http://refateid.blogspot.com/
    twitter :@avrail
    010011000111010101110110001000000100110101111001001000000101000001100011

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