About/Contact

Steve Trefethen

Steve Trefethen is a Director of Engineering at Reply. Contact me

View my LinkedIn profile


Powered by discountASP.NET
referal ID: sdtref
Why recommend discountASP.NET?
$720 in referrals so far!


Calendar

<<  February 2012  >>
MoTuWeThFrSaSu
303112345
6789101112
13141516171819
20212223242526
2728291234
567891011

View posts in large calendar

Disclaimer

The posts on this weblog are provided AS IS with no warranties, and confer no rights. The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.



Automatically expand listview columns to the size of their content

May 22 2007 9:25PM
Windows File Open dialog
Click for larger view.
Arrow indicates where you need to double click.
This should probably be filed under "Did you know?" Over lunch I was talking to Mark Edington about various UI-isms and he mentioned how the listview column header on Vista has no visual indicator for the splitter between columns. Specifically, he wanted to use the mouse to resize the column headers to so he could see all of the text from the items contained within that column. I mentioned the fact you can double click the splitter to automatically expand the column to the width of the content and he was like "Huh?! Is that just on the File dialog?" Nope, you can double click the splitter on any column header on any standard listview in windows and it will size to the width of the content. He said, "dude, that's something to blog". :-)

[Update May 22, 2007] This is too good not to add to this post. Via Eric van der Gaag pressing Ctrl-+ (Plus key from the keypad) will adjust the size of all the columns in the listview at once! Thanks Eric.
FacebookDel.icio.usDigg It!

Tags:

Comments (5) -

5/22/2007 11:44:38 PM #

Another feature for list views is that if you have the list view focused, if you press Ctrl+Enter, it will automatically resize all of the columns to fit the text.

Something that people might also not know about Smile

Erik van der Gaag

5/22/2007 11:49:20 PM #

Sorry,  I stuffed it up.  It's not Ctrl+Enter, It's Ctrl and Plus (+).  

Erik van der Gaag

5/23/2007 12:02:04 AM #

There isn't a day that goes by that I don't find something new to hate about Vista...

Of course, for this to work, you have to be in View|Details... mode -> Previously this was the only view with a set of column headers, but now every view has them to support the new filtering options.

Unfortunately, many modes don't have "columns" this way, but still show colunms. So this is yet ANOTHER UI feature in Vista that provides a seriously non-standard experience.  Try to double click and it just screws with your sorting (which always defaults to the exact opposite direction I want. Which would be almost be fine if the default wasn't NO sorting to begin with, and it didn't forget it 8 times out of 10 when you do try to save your sorting preferences.. meaning you have to click twice if you have to click once... AUGH)

I wish they would throw out ALL of the new, screwed up, deeply flawed non-consistent UI and just push the new kernel benefits back into the old XP interface which was at least consistent.

C Johnson

5/23/2007 11:25:53 AM #

Erik -> Interesting tip, as a footnote, it only works with the text on screen right that second, so as you scroll, you gotta keep adjusting it anways.

Kinda makes it another pointless feature... <sigh>

C Johnson

5/24/2007 8:44:27 PM #

OK, I only learned about the column auto-sizing a few months ago. It's not just on Vista, though. It works on XP and 2K, and for all I know, may even have started in NT.

The problem is, with an OS the size of Montana, how do you keep up with all the little additions?

By the way, is there a problem on FireFox with the code you show to validate an entry? Sometimes it shows, and sometimes not....

Bill Meyer

Add comment




  Country flag
biuquote
  • Comment
  • Preview
Loading