|
-
Apr 12th, 2013, 12:53 PM
#1
Thread Starter
Hyperactive Member
VB2010 Express: ListView Column Alignment Will Not Allow Change to Center
I have built a listview using the Details view, with five columns in it. I have named all the columnheaders and set the text alignment in each one to be centered. However, the first one on the left will not allow me to set it to anything but Left alignment. I have tried to change it more than once and no matter what I do in the properties dialog box with this setting is sticks on Left. The column header text in all the other fields aligns to the center.
-
Apr 12th, 2013, 12:54 PM
#2
Re: VB2010 Express: ListView Column Alignment Will Not Allow Change to Center
Have you tried changing it via code?
-
Apr 12th, 2013, 01:36 PM
#3
Thread Starter
Hyperactive Member
Re: VB2010 Express: ListView Column Alignment Will Not Allow Change to Center
I tried editing the Form1.Designer.vb file, which I understand is highly undesirable method of doing it. But it did not make any change and it did not cause any harm. I changed the file back to the way it was. I've been clicking on rebuild to make sure all the changes are there and it's not helping either.
I searched for how to do it with code, but the darn thing about listview is that most people seem to use icons, not details. Have not found anything on how to fix this yet. It's the first column on the left of the listview which is stuck with the left alignment. And it's weird because in the Form1.Designer.vb file, this header entry is the only one which does not have an alignment setting. All the others do.
-
Apr 12th, 2013, 01:39 PM
#4
Re: VB2010 Express: ListView Column Alignment Will Not Allow Change to Center
 Originally Posted by Vladamir
I tried editing the Form1.Designer.vb file, which I understand is highly undesirable method of doing it. But it did not make any change and it did not cause any harm. I changed the file back to the way it was. I've been clicking on rebuild to make sure all the changes are there and it's not helping either.
I searched for how to do it with code, but the darn thing about listview is that most people seem to use icons, not details. Have not found anything on how to fix this yet. It's the first column on the left of the listview which is stuck with the left alignment.
It appears the first column of a ListView cannot have the alignment changed. This is apparently by design. I found an old thread here that has a workaround.
Last edited by formlesstree4; Apr 12th, 2013 at 01:40 PM.
Reason: Redundant statements are very redundant...
-
Apr 12th, 2013, 01:43 PM
#5
Thread Starter
Hyperactive Member
Re: VB2010 Express: ListView Column Alignment Will Not Allow Change to Center
You know I was beginning to think something weird like this was up. Oh, if the folks who develop these apps only had to work with them on a daily basis...they'd certainly build them differently.
-
Apr 12th, 2013, 01:45 PM
#6
Re: VB2010 Express: ListView Column Alignment Will Not Allow Change to Center
 Originally Posted by Vladamir
You know I was beginning to think something weird like this was up. Oh, if the folks who develop these apps only had to work with them on a daily basis...they'd certainly build them differently.
Microsoft actively practices "dogfooding", or "eating your own dog food", so I'm hoping they did extensive testing on this and had a legitimate reason to do what they did. I mean, usually speaking, people throw images into the first column (or don't really need an alignment change), and simply hiding it doesn't cause any real problems. It's totally silly, and if you really wanted to, you could probably derive your own ListView control that allows for that first column to have its alignment changed.
-
Apr 12th, 2013, 02:04 PM
#7
Re: VB2010 Express: ListView Column Alignment Will Not Allow Change to Center
Er ... you do realise that Windows explorer uses a standard listview, right? Can't imagine the number of people wanting it any other way requiring more than a couple of hands to count it on. Center alignment is not favoured by any style guide for journalism, academic writing, science reports etc. that I know of.
As the 6-dimensional mathematics professor said to the brain surgeon, "It ain't Rocket Science!"
Reviews: "dunfiddlin likes his DataTables" - jmcilhinney
Please be aware that whilst I will read private messages (one day!) I am unlikely to reply to anything that does not contain offers of cash, fame or marriage!
-
Apr 12th, 2013, 02:07 PM
#8
Re: VB2010 Express: ListView Column Alignment Will Not Allow Change to Center
 Originally Posted by dunfiddlin
Er ... you do realise that Windows explorer uses a standard listview, right? Can't imagine the number of people wanting it any other way requiring more than a couple of hands to count it on. Center alignment is not favoured by any style guide for journalism, academic writing, science reports etc. that I know of.
Example!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|