Re: ListView column widths
- Posted by Euman <euman at BELLSOUTH.NET> Jan 13, 2001
- 424 views
Find This > inside win32lib.ew -- Begin Matt Lewis -- set up image lists and columns if class = ListView then if not ILlarge then ILlarge = createEx( ImageList, "", 0, 0,0,SM_CXICON,0, ILC_COLOR8,0) ILsmall = createEx( ImageList, "", 0, 0,0,SM_CXSMICON,0, ILC_COLOR8,0) end if for i = 1 to length( lvcol ) do insertListViewColumn( id, i-1, 0,0,100,lvcol[i],0) end for < Notice: insertListViewColumn( id, i-1, 0,0,100,lvcol[i],0) 100 is the magic number. This line is inside a forloop and can be given different info i.e: for i = 1 to length( lvcol ) do if i = 1 then -- first column insertListViewColumn( id, i-1, 0,0,50,lvcol[i],0) elsif i = 2 then -- second column insertListViewColumn( id, i-1, 0,0,100,lvcol[i],0) elsif i = 3 then -- third column insertListViewColumn( id, i-1, 0,0,150,lvcol[i],0) end if end for Probably could be a better way but, this works for me. Hope it helps! euman at bellsouth.net