470,647 Members | 1,395 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,647 developers. It's quick & easy.

center text in listview column 1

26 16bit
Possible to center text listview column 1 ( i know to the default is left)
Sep 8 '20 #1
3 6647
SioSio
269 256MB
Expand|Select|Wrap|Line Numbers
  1. ListView1.Columns(1).TextAlign = HorizontalAlignment.Center
Sep 9 '20 #2
sal21
26 16bit
@SioSio
dont work!

error in HorizontalAlignment
Mar 21 '22 #3
SioSio
269 256MB
Which listview is the question about?
In the Forms ListView, the first column is fixed to left justified.
WFP's ListView can be centered with the following settings.
Expand|Select|Wrap|Line Numbers
  1. <ListView.ItemContainerStyle>
  2.      <Style TargetType = "ListViewItem">
  3.          <Setter Property = "HorizontalContentAlignment" Value = "Stretch" />
  4.      </ Style>
  5. </ ListView.ItemContainerStyle>
Mar 22 '22 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

reply views Thread by m. pollack | last post: by
1 post views Thread by sa | last post: by
1 post views Thread by Sam Martin | last post: by
1 post views Thread by Mat | last post: by
reply views Thread by Alan T | last post: by
4 posts views Thread by Cheryl | last post: by
1 post views Thread by Korara | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.