Results 1 to 3 of 3

Thread: [RESOLVED] Align listview text

  1. #1

    Thread Starter
    Wall Poster TysonLPrice's Avatar
    Join Date
    Sep 2002
    Location
    Columbus, Ohio
    Posts
    3,969

    Resolved [RESOLVED] Align listview text

    I seem to be having trouble finding out how to right align the text in listview columns. We have common listview control at my shop and I need to align it at run time. Currently dollar values are left aligned. Alignment. doesn't have right as an option.

  2. #2
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    26,422

    Re: Align listview text

    the listview column has a textAlign property:

    vb Code:
    1. ListView1.Columns(0).TextAlign = HorizontalAlignment.Right

  3. #3

    Thread Starter
    Wall Poster TysonLPrice's Avatar
    Join Date
    Sep 2002
    Location
    Columbus, Ohio
    Posts
    3,969

    Re: Align listview text

    Quote Originally Posted by .paul. View Post
    the listview column has a textAlign property:

    vb Code:
    1. ListView1.Columns(0).TextAlign = HorizontalAlignment.Right
    Works great...thanks!

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