RE: ListView Column Width
- Posted by Jonas Temple <jktemple at yhti.net> Feb 20, 2002
- 464 views
Erik, I found that having Windows set the column width for you is a pretty easy approach to your problem. Here's an example: void = sendMessage(listView, LVM_SETCOLUMNWIDTH, column, width_type) where width_type is either a -1 or -2. -1 indicates to set the column width based on the longest data element and -2 indicates to set the width based on the column header text. Hope it helps! Jonas Erik-Jan van Kampen wrote: > I am writing a small program in which a ListView shows columns with > names > and columns with numbers. I was trying to set the width of the columns > upon > creating them, but I can't figure out how to do that. > Can anyone help me with this?