1. ListView columns
- Posted by Andy Drummond <kestrelandy at xalt.co.uk> Oct 12, 2001
- 375 views
I have started using ListView boxes - and they are very good. But does anyone know why I ALWAYS have one extra unused and unusable column on the right side? And how to get rid of it! I should be very glad to know. The demo program with Win32Lib shows the same effect, so maybe even DC has trouble with this.
2. Re: ListView columns
- Posted by euman at bellsouth.net Oct 12, 2001
- 395 views
Assuming you use Win32lib you can use insertListViewColumn Lke this: constant pListView = create( ListView,{ },hWnd,x1,y1,x2,y2,or_all({LVS_REPORT, LVS_SHOWSELALWAYS})) insertListViewColumn(pListView,1,0,LVCFMT_LEFT,90,"4",0) insertListViewColumn(pListView,1,0,LVCFMT_LEFT,33,"3",0) insertListViewColumn(pListView,1,0,LVCFMT_LEFT,33,"2",0) insertListViewColumn(pListView,1,0,LVCFMT_LEFT,33,"1",0) the command will let you set the width of the column and how many columns but, they have to be placed in reverse order which is strange practice. I think this is fixed in the next not yet released version of Win32lib. Hope this helps! Euman euman at bellsouth.net From: "Andy Drummond" <kestrelandy at xalt.co.uk> > I have started using ListView boxes - > and they are very good. > But does anyone know why I ALWAYS > have one extra unused and unusable > column on the right side? And how to > get rid of it! I should be very glad > to know. > The demo program with Win32Lib shows > the same effect, so maybe even DC > has trouble with this.
3. Re: ListView columns
- Posted by Dan Moyer <DANIELMOYER at prodigy.net> Oct 17, 2001
- 382 views
Andy, I don't think it is an actual "column", it's just unused space, that's why clicking on it has no effect. To get rid of it, you'd have to make the columns entirely fit the LV control. Use "getCtlSize ( atom id )" for the LV, then compute the desired sizes of the columns to entirely fit the LV in relation to the width of the LV, then use the "insertListViewColumn" command Euman suggested. Looks like if you add all the columns this way, you have to put the first column first, then reverse the order of all the remaining to get them to be in the expected place. For simplicity, however, if you put the first column in when you create the LV, then you can just put *all* the added ones in reverse order, but then you lose the ability to set the width of the first column. Dan Moyer ----- Original Message ----- From: "Andy Drummond" <kestrelandy at xalt.co.uk> To: "EUforum" <EUforum at topica.com> Sent: Friday, October 12, 2001 3:10 PM Subject: ListView columns > > I have started using ListView boxes - > and they are very good. > But does anyone know why I ALWAYS > have one extra unused and unusable > column on the right side? And how to > get rid of it! I should be very glad > to know. > The demo program with Win32Lib shows > the same effect, so maybe even DC > has trouble with this. > > >