How do I force a label to only autosize itself horizontally?

Posted on 2007-07-26
Last Modified: 2007-08-01
I have a label on a form which has the autosize property set to true.  When I resize the form such that the label can not be displayed entirely, the label automatically wraps the text to a second line.  I want to disable this behavior, but I still want it to autosize itself horizontally.
Question by:McBluffin
    LVL 19

    Expert Comment

    label.wordwrap = false

    Author Comment

    wordwrap is not a property of the label class.
    LVL 10

    Accepted Solution

    The only way I have yet been able to duplicate your problem is by having a maximum width set on the label. Check to make sure you do not have a max width set on the label.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    It’s quite interesting for me as I worked with Excel using for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
    A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now