It is possible to use a ImageList with a listbox
I use a ImageList for listview and treeview to draw a bmp
can i use this for a listbox?
Greets,
I don't think so, without subclassing and drawing the images yourself. (It doesn't appear to support custom-draw either.)
Why not use a single column listview?
QuoteWhy not use a single column listview?
Yes this ist the simply way but how i can hide this column header?
disable the column header can i with this
invoke SendMessage,hList,LVM_GETHEADER,0,0
invoke EnableWindow,eax,FALSE
I need a hide column header function then have i a listbox :bg
Quote from: ragdog on January 23, 2011, 04:53:04 PM
Yes this ist the simply way but how i can hide this column header?
disable the column header can i with this
invoke SendMessage,hList,LVM_GETHEADER,0,0
invoke EnableWindow,eax,FALSE
I need a hide column header function then have i a listbox :bg
Why not just create the listview with the styles:
LVS_REPORT
LVS_NOCOLUMNHEADER
Ok thanks i Try it
Hi Ragdog,
I didn't see this thread til now. You can use ownerdrawn listboxes for this. I have attached an example that uses an imagelist and displays the images in the listbox.
Edgar
Thanks Edgar :U
I have change it to a listview for use a imagelist
now have i a question by a listbox can i use LB_SETITEMDATA and LB_GETITEMDATA
for add True and false (if checked or not) gives this for a listview?
Quote from: ragdog on January 29, 2011, 06:54:18 PM
I have change it to a listview for use a imagelist
Why would you need to do that ? As I showed in my example using an image list with a listbox is a simply an ownerdraw issue.
Quotenow have i a question by a listbox can i use LB_SETITEMDATA and LB_GETITEMDATA
for add True and false (if checked or not) gives this for a listview?
No, those messages are for listboxes only, however you can use LVM_SETITEM and use the LVITEM.lParam or LVITEM.iImage members to track check marks. In my example the ITEMDATA is used to retain the image index.
Your example if very good but i have thinking about my project and i need more as a one column ::)
Sorry I think your exmple can i use for a other project :U
Thanks for this LVM tip
Quote from: ragdog on January 30, 2011, 03:27:21 AM
Your example if very good but i have thinking about my project and i need more as a one column ::)
Sorry I think your exmple can i use for a other project :U
Thanks for this LVM tip
Ah, well then a listbox was never what you required, a listview handles multiple columns quite well. Though I have used listboxes for columns in the past it was for a custom control and the code is lost in my archives and not very useful in this case. Good luck with the project.