IBaseComboBox::Cursor

The nested class IBaseComboBox::Cursor defines objects that you can use to traverse through the items in a combination box. In the same way that you can use a cursor to traverse through the objects in a collection, you can use this cursor to traverse through a combination box, one item at a time.


IBaseComboBox::Cursor - Member Functions and Data by Group

Constructors & Destructor

You can construct and destruct objects of this class.


[view class]
~Cursor
public:
virtual ~Cursor()

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
Cursor
public:
Cursor( const IBaseComboBox& comboBox, Filter type = selectedItems )

You can create objects of this class by using the combination box and a filter type.

comboBox
A combination box control.
type
Use the enumeration Filter to specify the type of filter for the combination box. The type specifies how the cursor traverses to the next item in the list box portion of the combination box. The default is selectedItems.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Cursor Movement

Use these members to control cursor movement in the list box portion of a combination box.


[view class]
setToFirst
public:
virtual bool setToFirst()

Points to the first list box item and validates the cursor. If the cursor is set successfully, true is returned. Otherwise, false is returned.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
setToIndex
public:
virtual bool setToIndex(unsigned long index)

Points to the specified item and validates the cursor. If the cursor is set to the specified list box item, true is returned. Otherwise, false is returned.

index
A 0-based index indicating the item upon which you want the cursor placed.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
setToLast
public:
virtual bool setToLast()

Points to the last list box item and validates the cursor. If the cursor is set successfully, true is returned. Otherwise, false is returned.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
setToNext
public:
virtual bool setToNext()

Points to the next item in the list box. If the cursor is set to the next list box item, true is returned. If no more items exist, this function invalidates the cursor and false is returned.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
setToPrevious
public:
virtual bool setToPrevious()

Points to the previous item in the list box. If the cursor is set to the previous list box item, true is returned. If no previous item exists, this function invalidates the cursor and false is returned.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Cursor Validation and Conversion

Use these members to query or return information about the item to which the cursor is pointing.


[view class]
asIndex
public:
virtual unsigned long asIndex() const

Returns the 0-based index of the item pointed to by the cursor.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
invalidate
public:
virtual void invalidate()

Flags the cursor as not valid.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
isValid
public:
virtual bool isValid() const

Returns a boolean depending on whether the cursor is pointing to a valid item. If the cursor is pointing to a valid item, true is returned. Otherwise, false is returned.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


IBaseComboBox::Cursor - Enumerations


[view class]
Filter
enum Filter { selectedItems, 
              allItems }

Use these enumerators to specify the filter for the combination box cursor:

selectedItems
Filters only items that are selected.
allItems
Filters all items.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


IBaseComboBox::Cursor - Inherited Member Functions and Data

Inherited Public Functions

Inherited Public Data

Inherited Protected Functions

Inherited Protected Data