CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Label Wrap

  1. #1
    Join Date
    May 2004
    Posts
    42

    Label Wrap

    this will be a really easy question I am sure of it. I am a converting VB6 programer. I am in the process of re-writting my VB6 applications to .NET. This is my learning process. My question is in VB6 a lable could have a height & width and the text would wrap. In VB.NET the text no longer wraps. So if I have a really long name the label keeps growing.

    Any Ideas on how I can get a label to have a height, width & wrap again.

    Thanks for your help

  2. #2
    Join Date
    Jul 2001
    Location
    Sunny South Africa
    Posts
    11,284

    Re: Label Wrap

    The Windows Forms Label control can be single-line or multi-line, and it can be either fixed in size or can automatically resize itself to accommodate its caption. The AutoSize property helps you size the controls to fit larger or smaller captions, which is particularly useful if the caption will change at run time.

    To make a label control resize dynamically to fit its contents
    Set its AutoSize property to true.

    If AutoSize is set to false, the words specified in the Text property will wrap to the next line if possible, but the control will not grow.

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

Featured