A component that combines a button or editable field and a drop-down list. More...
#include <CComboBox.h>
Public Member Functions | |
CComboBox () | |
Creates a CComboBox with an empty list of objects. | |
void | AddItem (SItem *item) |
Adds an item to the item list. | |
void | RemoveItem (SItem *item) |
Removes an item from the item list. | |
virtual void | Paint (CGraphics *g) |
Paints the component. | |
virtual void | ProcessComponentKeyEvent (SKeyEvent *e) |
Processes events occurring on this component,. |
A component that combines a button or editable field and a drop-down list.
The user can select a value from the drop-down list, which appears at the user's request. If you make the combo box editable, then the combo box includes an editable field into which the user can type a value.
CComboBox::CComboBox | ( | ) |
Creates a CComboBox
with an empty list of objects.
Use AddItem
to add items. By default the first item becomes selected.
void CComboBox::AddItem | ( | SItem * | item | ) |
Adds an item to the item list.
Warning: Focus and keyboard navigation problems may arise if you add duplicate objects.
item | the Object to add to the list |
void CComboBox::Paint | ( | CGraphics * | g | ) | [virtual] |
Paints the component.
This forwards the paint to any components that are children of this component. If this method is reimplemented, Paint(g) of base class should be called so components are properly rendered.
g | - the specified Graphics context |
Reimplemented from CComponent.
void CComboBox::ProcessComponentKeyEvent | ( | SKeyEvent * | e | ) | [virtual] |
Processes events occurring on this component,.
e | - the event |
Reimplemented from CComponent.
void CComboBox::RemoveItem | ( | SItem * | item | ) |
Removes an item from the item list.
item | - the SItem to remove from the item list |