Label Control Text Alignment....


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: Label Control Text Alignment....

  1. #1
    Boyd Campbell Guest

    Label Control Text Alignment....


    I feel foolish asking for help on this, but I just can't seem to get the text
    in my label control (System.Windows.Forms.Label) to simply align properly.
    When I set the TextAlign property to MiddleRight, the text is indeed lined
    up in the middle, but NOT on the right, depending on the size of the text
    I put in the label.

    IE: I have six labels that I have sized exactly the same, positioned top
    to bottom on the form and right-aligned. The only difference in the physical
    controls other than the names is the text that they hold. However, depending
    on the length of the text in the control, the text appears to get dynamically
    "re-aligned" inside the control. The longer the text is, the farther to the
    left the text moves within the control. So here's how the text looks when
    I run the form....I'll attempt to give the best perspective I can in this
    text-based window:

    Employee ID Number:
    First Name:
    Initial:
    Last Name:
    Title:
    Department:

    Again, all six controls are the same size and have the TextAlign property
    set to MiddleRight. What the heck is the problem?

    Boydski

  2. #2
    Jeff Johnson Guest

    Re: Label Control Text Alignment....


    "Boyd Campbell" <boydski@alltel.net> wrote:
    >
    >Again, all six controls are the same size and have the TextAlign property
    >set to MiddleRight. What the heck is the problem?
    >
    >Boydski


    This looks like a bug to me. Either that or TextAlign.xxxRight serves no
    useful purpose at all.

    MS?

    -- Jeff

  3. #3
    Boyd Campbell Guest

    Re: Label Control Text Alignment....


    "Jeff Johnson" <jeff@nospam.com> wrote:
    >
    >This looks like a bug to me. Either that or TextAlign.xxxRight serves no
    >useful purpose at all.
    >
    >MS?
    >
    >-- Jeff



    Well, looks that way to me to...but it's always good to get some wisdom from
    another few sets of eyes. I'll wait and see if anyone else responds before
    I escalate the issue upward. Thanx for your input!

    Boyd

  4. #4
    Boyd Campbell Guest

    Re: Label Control Text Alignment....


    "Jeff Johnson" <jeff@nospam.com> wrote:
    >
    >This looks like a bug to me. Either that or TextAlign.xxxRight serves no
    >useful purpose at all.
    >
    >MS?
    >
    >-- Jeff



    Well, looks that way to me to...but it's always good to get some wisdom from
    another few sets of eyes. I'll wait and see if anyone else responds before
    I escalate the issue upward. Thanx for your input!

    Boyd

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center