Creating a multi-column Listbox
Hi,
How do I create a multi-column litbox ??
I''m working with resources "DialogBox()" and I''ve defined
the multi-column style but when I run my program there''s no
columns at all.......
How do I make it? Do I need to use CreateWindowex ???
thanx
KaMiKaZe
Im not sure how to fix your problem, but maybe if you post some code the other guys here will help out. They are usually very helpful.
January 16, 2003 07:34 AM
specifying a multicolumn style for a standard listbox control does not create what would normally be considered to be a multicolumn listbox. what it causes the control to do is display the added and inserted rows in a newspaper-like fashion, with the rows "wrapping" to a new column once the bottom of the control window is filled. what you end up with is a horizontally scrolling listbox.
to get multiple columns per row, which is what i think you want, you can either set/use tabstops with a standard listbox control, or you can use a listview control. a listview control is the same control used in the righthand pane of Explorer windows. listviews have much more functionality.
to get multiple columns per row, which is what i think you want, you can either set/use tabstops with a standard listbox control, or you can use a listview control. a listview control is the same control used in the righthand pane of Explorer windows. listviews have much more functionality.
quote: Original post by Anonymous Poster
specifying a multicolumn style for a standard listbox control does not create what would normally be considered to be a multicolumn listbox. what it causes the control to do is display the added and inserted rows in a newspaper-like fashion, with the rows "wrapping" to a new column once the bottom of the control window is filled. what you end up with is a horizontally scrolling listbox.
to get multiple columns per row, which is what i think you want, you can either set/use tabstops with a standard listbox control, or you can use a listview control. a listview control is the same control used in the righthand pane of Explorer windows. listviews have much more functionality.
Oh, yeah, that''s true, it creates a thing like in excel, with cells
instead of columns... Is there another control that will do my
clolumns ? I heard of a "ListView" control instead of "ListBox",
it has a struct called "LV_COLUMN" so I think that''s it, well thanx
guys...
KaMiKaZe
January 16, 2003 11:35 AM
quote: Original post by Kamikaze15Original post by Anonymous Poster
Is there another control that will do my
clolumns ? I heard of a "ListView" control instead of "ListBox",
it has a struct called "LV_COLUMN" so I think that''s it, well thanx
guys…
yes, a ListView control would work for you but it might be overkill. it depends upon what you want to do. if you haven''t used them before then they take a bit of work to get them set up and handled correctly. but once you do then you have a lot of functionality at your fingertips. maybe you should search for a wrapper class to get you started, if you want to use one.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement