## Description

Include file: xlistbox.h

Parent class: XControl

### Overview

### Functions

#### XListBox

#### Parameters

XWindow * theOwner | The owning window
XRect * rectangle | Position and size of the listbox
USHORT ID | The ID of the window. Default is zero.
ULONG style | The style of the window. Valid values are:
LS_SCROLL | the listbox gets a horizontal scrollbar
LS_MULTI | one ore more items can be selected
LS_EXTENDED | extended selection is enabled (should be used if LS_MULTI is specified).
The values can be or-ed.
char * font | font to use, e.g. "8.Helvetica"

#### Remarks

Construct a listbox

#### InsertItem

#### Parameters

char * theTitle | title of the item
SHORT position | where to insert. You can specify the zero-based index, LS_LAST (the item is inserted at the end of the list), LS_ASCENDING (the items are sorted ascending) or LS_DESCENDING (items are sorted descending) Default is LS_LAST.

#### Return-Value

SHORT the zero-based index of the item

#### Remarks

Adds a an item to the listbox

#### RemoveAll

#### Return-Value

BOOL result

#### Remarks

Removes all items from a listbox.

#### RemoveItem

#### Parameters

SHORT theItem Zero-based index of the item to remove

#### Remarks

Removes an item

#### GetCount

#### Return-Value

SHORT the count of items in the listbox

#### Remarks

Returns the count of items.

#### GetTopIndex

#### Return-Value

SHORT index

#### Remarks

Returns the index of the first visible entry.

#### SearchString

#### Parameters

char * theText | text to be searched
SHORT startPosition | Zero-based index of item where to start the search
SHORT matchCode | How to search. Valid values are:
LS_CASESENSITIVE | search casesensitive
LS_PREFIX | search-string must be at the beginning of the items title
LS_SUBSTRING | search-string can be in the middle of the items title
LS_CASESSENSITIVE can be or-ed with one of the other defines.

#### Return-Value

SHORT Zero-based index of the item which is found. If no item is found, LS_NONE is returned.

#### Remarks

Search a string in the listbox

#### SetItemHeight

#### Parameters

SHORT height

#### Remarks

Set items height

#### SetItemWidth

#### Parameters

SHORT width

#### Remarks

Set items width

#### SetTopIndex

#### Parameters

SHORT index index of the first visible entry

#### Remarks

Set the first visible entry.

#### GetSelection

#### Parameters

SHORT searchAfterItem Zero-based index of the item behind which the search starts (defaultt is LS_FIRST)

#### Return-Value

SHORT Zero-based index of the item found. If no item is found return is LS_NONE

#### Remarks

Returns the zero-based index of the first selected item which is found after the specified item.

#### SelectItem

#### Parameters

SHORT theItem Zero-based index of the item to select

#### Remarks

Select an item

#### GetItemText

#### Parameters

SHORT theItem Zero-based index of the item
XString * buffer buffer which will hold the text

#### Return-Value

SHORT length of the text

#### Remarks

Get the text of an item

#### SetItemText

#### Parameters

SHORT theItem Zero-based index of the item
char * theText the new text

#### Return-Value

BOOL success

#### Remarks

Set the text of an item.

#### GetItemHandle

#### Parameters

SHORT theItem Zero-based index of the item

#### Return-Value

LONG the handle of the item

#### Remarks

Gets a handle of an item.

#### SetItemHandle

#### Parameters

SHORT theItem Zero-based index of the item which will get the handle
LONG theHandle the handle which is add to the item

#### Return-Value

BOOL success

#### Remarks

Adds a handle to an item

This document was generated by Jens von Pilgrim's Autodoc