CComboBox Class Reference

A component that combines a button or editable field and a drop-down list. More...

#include <CComboBox.h>

Inheritance diagram for CComboBox:
CComponent

List of all members.

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,.

Detailed Description

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.


Constructor & Destructor Documentation

CComboBox::CComboBox (  ) 

Creates a CComboBox with an empty list of objects.

Use AddItem to add items. By default the first item becomes selected.


Member Function Documentation

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.

Parameters:
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.

Parameters:
g - the specified Graphics context
See also:
Redraw

Reimplemented from CComponent.

void CComboBox::ProcessComponentKeyEvent ( SKeyEvent *  e  )  [virtual]

Processes events occurring on this component,.

Parameters:
e - the event
See also:
DispatchEvent

Reimplemented from CComponent.

void CComboBox::RemoveItem ( SItem *  item  ) 

Removes an item from the item list.

Parameters:
item - the SItem to remove from the item list

The documentation for this class was generated from the following files:
Generated on Tue Jun 29 18:34:05 2010 for guilib by  doxygen 1.6.3