<< Return to Main Index

< Return to Class Index

CGXComboBox::OnFillDroppedList

virtual void OnFillDroppedList(CListBox* pLbox);

pLbox

A pointer to the list box.

Remarks

Called after the list box has been created and needs to be filled with items. The default version of this method reads all items from the choice list. Finally it selects the item which best fits the text in the edit window.

If you do not want to fill the combo box from the choice list, you should override this method and fill the list box by subsequently calling its AddItem method.

Note: If you want to fill the list box part at runtime in an overridden OnFillDroppedList method, you should assign FALSE to m_bFillWithChoiceList in the constructor of your derived class.

Note: See also the example in the class description for how to override GetStyleRowCol and determine the choice list at runtime. Before you start subclassing CGXComboBox and override the OnFillDroppedList member to fill the dropdown list at runtime, consider whether overriding GetStyleRowCol might be an easier solution.

See Also

CGXComboBox

CGXComboBox

Class Overview | Class Members