1. List View Column Widths
- Posted by Tony Steward <figjam at nlc.net.au> Jun 02, 2001
- 425 views
Hi All, Is it possible to get the widths of columns from a list view. What I wish to do is save to disk the column widths when my program closes, so when it opens next time it will be as it was before. I want to do this because to autosize a listview of 2000 lines is too time consuming and to do this every time you use the program seems a waste. Thanks Tony
2. Re: List View Column Widths
- Posted by Derek Parnell <ddparnell at bigpond.com> Jun 03, 2001
- 401 views
Tony, try this... sequence colwidths integer colw colwidths = {} for colnum = 0 to 9999 do colw = sendMessage(myLV, LVM_GETCOLUMNWIDTH, colnum, 0) if colw = 0 then exit end if colwidths &= colw end for if zero is returned, it means that colnum doesn't exist. ------ Derek Parnell Melbourne, Australia "To finish a job quickly, go slower." ----- Original Message ----- From: "Tony Steward" <figjam at nlc.net.au> To: "EUforum" <EUforum at topica.com> Sent: Tuesday, January 02, 2001 9:41 AM Subject: List View Column Widths > > > Hi All, > Is it possible to get the widths of columns from a list view. > > What I wish to do is save to disk the column widths when my program closes, > so when it opens next time it will be as it was before. I want to do this > because to autosize a listview of 2000 lines is too time consuming and to do > this every time you use the program seems a waste. > > Thanks > Tony > > > >
3. Re: List View Column Widths
- Posted by Derek Parnell <ddparnell at bigpond.com> Jun 03, 2001
- 440 views
4. Re:List View Column Widths
- Posted by francis.dowling at runbox.com Jun 05, 2001
- 408 views
This might be implemented directly in Win32Lib, however if its not here are= two function which will do it: function ListView_GetColumnWidth(integer listview_id,integer column_id) return sendMessage(listview_id,LVM_GETCOLUMN_WIDTH,column_id,NULL) end function procedure ListView_SetColumnWidth(integer listview_id,integer column_id,ato= m new_width) atom garbage garbage=3DsendMessage(listview_id,LVM_SETCOLUMN_WIDTH,column_id,new_width) end procedure
5. Re:List View Column Widths
- Posted by francis.dowling at runbox.com Jun 05, 2001
- 413 views
This might be implemented directly in Win32Lib, however if its not here are= two function which will do it: function ListView_GetColumnWidth(integer listview_id,integer column_id) return sendMessage(listview_id,LVM_GETCOLUM_WIDTH,column_id,NULL) end function procedure ListView_SetColumnWidth(integer listview_id,integer column_id,ato= m new_width) atom garbage garbage=3DsendMessage(listview_id,LVM_SETCOLUMN_WIDTH,column_id,new_width) end procedure