Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multi-column Listbox problem

Status
Not open for further replies.

base2

Programmer
Apr 18, 2002
7
US
I am using a CListbox control within a CPropertyPage. I have defined the listbox with 'multi-column' and 'use tab-stops' selected in the properties dialog. I do AddString calls using a string formatted with "%s\t%s\t%s\t%s" and that works fine. However, when I run the app. and click on one of the listbox entries, while it highlights the entire line of four strings, the item can only be selected in the region of the first three strings. I don't see how I set the extent of the selection region.

Q: Is this a design-time setting I am overlooking or does a call need to be made in the CPropertyPage's constructor to set the selection extent for the listbox or do I have to override a handler to get the entire listbox item (i.e. the entire horizontal line area) to act as a valid selection area for the item?

Thanks.
 
Hi

I never experience this problem but I'm quite sure that you will avoid the extra work you intend to do by simply using a CListCtrl control.
It's very easy to use, have much more possibilities and, above all perhaps, will give to your apps a more professional look ...

Thierry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top