Objective Grid: Sorting a combobox cell

Article ID: 540
Last updated: 16 Apr, 2018
Article ID: 540
Last updated: 16 Apr, 2018
Revision: 3
Views: 1949
Posted: 10 Jan, 2001
by Meltreger B.
Updated: 16 Apr, 2018
by Meltreger B.

Problem


How can I get the list box in a CGXComboBoxWnd cell to be sorted?


Cause



Action


You should register the combo box with the CBS_SORT flag as follows:

// CComboBox adapter with CBS_DROPDOWN style
{
CGXComboBoxWnd* pWnd = new CGXComboBoxWnd(this);

pWnd->Create(WS_VSCROLL | CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT, 0);
pWnd->m_bFillWithChoiceList = TRUE;
pWnd->m_bWantArrowKeys = FALSE;

RegisterControl(GX_IDS_CTRL_CBS_DROPDOWN, pWnd);

}

This article was:   Helpful | Not helpful
Report an issue
Article ID: 540
Last updated: 16 Apr, 2018
Revision: 3
Views: 1949
Posted: 10 Jan, 2001 by Meltreger B.
Updated: 16 Apr, 2018 by Meltreger B.

Others in this category