1. RE: ListView Column Width
- Posted by Jonas Temple <jktemple at yhti.net> Feb 20, 2002
- 466 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?
2. RE: ListView Column Width
- Posted by Derek Parnell <Derek.Parnell at SYD.RABOBANK.COM> May 26, 2002
- 443 views
This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_000_01C20527.A9ABB0A0 charset=iso-8859-1 > -----Original Message----- > From: Dan Moyer [mailto:DANIELMOYER at prodigy.net] > Sent: Monday, 27 May 2002 12:35 > To: EUforum > Subject: Re: ListView Column Width > > > > Jon, > > I haven't used ListView, but a look at the ListView demo > suggests that you > just put a column width in the ListView creation after the > text; I changed > the "180" after "Library" to "80", and it gave a narrower > column (don't know > what the '<' & '^' are all about, though): > > LV = create( ListView, > { {"Library",180,'<'}, {"Author",116,'^'} }, > Win, > 320, > 40, > 300, --CW_USEDEFAULT, > 300, --CW_USEDEFAULT, > or_all({LVS_REPORT, LVS_SHOWSELALWAYS})) > > Dan Moyer > > ----- Original Message ----- > From: "Jon Snyder" <jongsnyder at hotmail.com> > To: "EUforum" <EUforum at topica.com> > Sent: Sunday, May 26, 2002 10:47 AM > Subject: ListView Column Width > > > > > > When using a listview with Win32lib how can you adjust the > width of the > > columns from the program? It would be great to see an example. > > > > > > Yes you can. Either at ListView creation time (as Dan mentioned above) or via the setLVColumn routine (I think that it's name). The '<', '^', '>' indicate left, centre and right aligned text respectively. ------ Derek. ================================================================== De informatie opgenomen in dit bericht kan vertrouwelijk zijn en is uitsluitend bestemd voor de geadresseerde. Indien u dit bericht onterecht ontvangt wordt u verzocht de inhoud niet te gebruiken en de afzender direct te informeren door het bericht te retourneren. ================================================================== The information contained in this message may be confidential and is intended to be exclusively for the addressee. Should you receive this message unintentionally, please do not use the contents herein and notify the sender immediately by return e-mail. ================================================================== ------_=_NextPart_000_01C20527.A9ABB0A0 Content-Type: application/ms-tnef
3. RE: ListView Column Width
- Posted by Judith <camping at txcyber.com> May 27, 2002
- 468 views
I had not noticed in the listview examples that you could create the ListView with the column lengths and alignment. This is much easier than the sendMessage I put into IDE to do this. I'll make some changes for the next release. Thanks Dan. With the next IDE release, probably August or September, I'll be requiring the use of the latest Win32lib. I'll be using several new routines recently developed; the one Derek mentions below is one of them. Judith Derek Parnell wrote: > > > -----Original Message----- > > From: Dan Moyer [mailto:DANIELMOYER at prodigy.net] > > Sent: Monday, 27 May 2002 12:35 > > To: EUforum > > Subject: Re: ListView Column Width > > > > > > > > Jon, > > > > I haven't used ListView, but a look at the ListView demo > > suggests that you > > just put a column width in the ListView creation after the > > text; I changed > > the "180" after "Library" to "80", and it gave a narrower > > column (don't know > > what the '<' & '^' are all about, though): > > > > LV = create( ListView, > > { {"Library",180,'<'}, {"Author",116,'^'} }, > > Win, > > 320, > > 40, > > 300, --CW_USEDEFAULT, > > 300, --CW_USEDEFAULT, > > or_all({LVS_REPORT, LVS_SHOWSELALWAYS})) > > > > Dan Moyer > > > > ----- Original Message ----- > > From: "Jon Snyder" <jongsnyder at hotmail.com> > > To: "EUforum" <EUforum at topica.com> > > Sent: Sunday, May 26, 2002 10:47 AM > > Subject: ListView Column Width > > > > > > > > > > When using a listview with Win32lib how can you adjust the > > width of the > > > columns from the program? It would be great to see an example. > > > > > > > > > > Yes you can. Either at ListView creation time (as Dan mentioned above) > or > via the setLVColumn routine (I think that it's name). The '<', '^', '>' > indicate left, centre and right aligned text respectively. > > ------ > Derek. > > is uitsluitend bestemd voor de geadresseerde. Indien u dit bericht > onterecht ontvangt wordt u verzocht de inhoud niet te gebruiken en > de afzender direct te informeren door het bericht te retourneren. > and is intended to be exclusively for the addressee. Should you > receive this message unintentionally, please do not use the contents > herein and notify the sender immediately by return e-mail. > > >