1. ListView first column indent in win32lib
- Posted by marky1124 <mark_young at hotma?l.co?> Jun 03, 2008
- 701 views
Hi, It seems that win32lib forces an indent for the first column of data in a listview object to allow for an icon to be displayed, even if one is not required. I believe it has been requested before that win32lib be modified to make this an option, see this post from 2001 http://www.openeuphoria.org/cgi-bin/esearch.exu?thread=1&fromMonth=3&fromYear=6&toMonth=5&toYear=6&keywords=%22Win32Lib+hacks%22 I've checked and commenting out line 2412 in win32lib.ew v0.70.4 does prevent an ident on the first column (at the cost of not being able to display an icon I suspect). Is there any chance of win32lib being enhanced to make this first column indent optional? Cheers, Mark
2. Re: ListView first column indent in win32lib
- Posted by CChris <christian.cuvier at agr?culture.gou?.fr> Jun 03, 2008
- 689 views
marky1124 wrote: > > Hi, > > It seems that win32lib forces an indent for the first column of data in a > listview > object to allow for an icon to be displayed, even if one is not required. > > I believe it has been requested before that win32lib be modified to make this > an option, see this post from 2001 > > <a > href="http://www.openeuphoria.org/cgi-bin/esearch.exu?thread=1&fromMonth=3&fromYear=6&toMonth=5&toYear=6&keywords=%22Win32Lib+hacks%22">http://www.openeuphoria.org/cgi-bin/esearch.exu?thread=1&fromMonth=3&fromYear=6&toMonth=5&toYear=6&keywords=%22Win32Lib+hacks%22</a> > > I've checked and commenting out line 2412 in win32lib.ew v0.70.4 does prevent > an ident on the first column (at the cost of not being able to display an icon > I suspect). > > Is there any chance of win32lib being enhanced to make this first column > indent > optional? > > Cheers, > Mark I'll check whether having no icon to display has any undesirable side effect. If it hasn't, then I'll probably add a custom LVS_EX_NOIMAGELIST style, so that no image list is associated to the LV when the style is given to createEx(). Inn the meantime, you can always try to: w32VOID=sendMessage(lv_id,LVM_SETIMAGELIST,LVSI_NORMAL,0) w32VOID=sendMessage(lv_id,LVM_SETIMAGELIST,LVSI_SMALL,0) However, I am not sure you can remove the white soace where the image would go, since MSDN says the following about the LVS_REPORT style, which I waaume you are using: " The leftmost column is always left justified and contains the small icon and label. Subsequent columns contain subitems as specified by the application. " HTH CChris
3. Re: ListView first column indent in win32lib
- Posted by marky1124 <mark_young at hotmail.co?> Jun 03, 2008
- 681 views
Hi Chris, Thanks for the reply. I tried your suggestion but it didn't work. I assumed that LVSI_NORMAL was a typo for LVSIL_NORMAL etc.. and so I tried... w32VOID = sendMessage(ListView11,LVM_SETIMAGELIST,LVSIL_NORMAL,0) w32VOID = sendMessage(ListView11,LVM_SETIMAGELIST,LVSIL_SMALL,0) You are right I am using the REPORT style, but only because it was the default that the IDE chose. I also tested the LIST style and it kept it's indent as well. So I guess you are right, as per the MSDN docs, once the indent/offset is there you're stuck with it. Cheers, Mark
4. Re: ListView first column indent in win32lib
- Posted by CChris <christian.cuvier at ?gricu?ture.gouv.fr> Jun 04, 2008
- 716 views
marky1124 wrote: > > Hi Chris, > > Thanks for the reply. I tried your suggestion but it didn't work. I assumed > that LVSI_NORMAL was a typo for LVSIL_NORMAL etc.. and so I tried... > > w32VOID = sendMessage(ListView11,LVM_SETIMAGELIST,LVSIL_NORMAL,0) > w32VOID = sendMessage(ListView11,LVM_SETIMAGELIST,LVSIL_SMALL,0) > > You are right I am using the REPORT style, but only because it was the default > that the IDE chose. I also tested the LIST style and it kept it's indent as > well. > > So I guess you are right, as per the MSDN docs, once the indent/offset is > there > you're stuck with it. > > Cheers, > Mark If I can hack something like setting the 1st column to 1px wide and using whatever formatting on the second column (which would pretend to be the 1st etc), I'll put it in a demo. But I don't think I can directly hack this into win32lib, unless I find some brilliant idea. CChris