interface XListBox in module com::sun::star::awt::

(Global Index)

Syntax

interface XListBox : com::sun::star::uno::XInterface ;

Description

gives access to the items and their state and to register for item and action events of a listbox.

Method Summary

addItemListener registers an item event listener.

removeItemListener unregisters an item event listener.

addActionListener registers an action event listener.

removeActionListener unregisters an action event listener.

addItem adds an item at a specified position.

addItems adds multiple items at a specified position.

removeItems removes a number of items at a specified position.

getItemCount

getItem

getItems

getSelectedItemPos

getSelectedItemsPos

getSelectedItem

getSelectedItems

selectItemPos selects/unselects the item at the specified position.

selectItemsPos selects/unselects multiple items at the specified positions.

selectItem selects/unselects the specified item.

isMutipleMode

setMultipleMode determines if only a single item or multiple items can be selected.

getDropDownLineCount

setDropDownLineCount sets the number of visible lines for drop down mode.

makeVisible makes the item at the specified position visible by scolling.

Known Services Which Export this Interface

com::sun::star::awt::UnoControlListBox

Method Details



addItemListener

Syntax

oneway void addItemListener (
com::sun::star::awt::XItemListener l );

Description

registers an item event listener.


removeItemListener

Syntax

oneway void removeItemListener (
com::sun::star::awt::XItemListener l );

Description

unregisters an item event listener.


addActionListener

Syntax

oneway void addActionListener (
com::sun::star::awt::XActionListener l );

Description

registers an action event listener.


removeActionListener

Syntax

oneway void removeActionListener (
com::sun::star::awt::XActionListener l );

Description

unregisters an action event listener.


addItem

Syntax

oneway void addItem (
string aItem,
short nPos );

Description

adds an item at a specified position.


addItems

Syntax

oneway void addItems (
sequence< string > aItems,
short nPos );

Description

adds multiple items at a specified position.


removeItems

Syntax

oneway void removeItems (
short nPos,
short nCount );

Description

removes a number of items at a specified position.


getItemCount

Syntax

short getItemCount ();

Returns

the number of items currently in the listbox.

getItem

Syntax

string getItem (
short nPos );

Returns

the item at the specified position.

getItems

Syntax

sequence< string > getItems ();

Returns

all items of the list box.

getSelectedItemPos

Syntax

short getSelectedItemPos ();

Returns

the position of the currently selected item.

getSelectedItemsPos

Syntax

sequence< short > getSelectedItemsPos ();

Returns

the positions of all currently selected items.

getSelectedItem

Syntax

string getSelectedItem ();

Returns

the currently selected item.

getSelectedItems

Syntax

sequence< string > getSelectedItems ();

Returns

all currently selected items.

selectItemPos

Syntax

oneway void selectItemPos (
short nPos,
boolean bSelect );

Description

selects/unselects the item at the specified position.


selectItemsPos

Syntax

oneway void selectItemsPos (
sequence< short > aPositions,
boolean bSelect );

Description

selects/unselects multiple items at the specified positions.


selectItem

Syntax

oneway void selectItem (
string aItem,
boolean bSelect );

Description

selects/unselects the specified item.


isMutipleMode

Syntax

boolean isMutipleMode ();

Returns

true if multiple items can be selected, false if only one item can be selected.

setMultipleMode

Syntax

oneway void setMultipleMode (
boolean bMulti );

Description

determines if only a single item or multiple items can be selected.


getDropDownLineCount

Syntax

short getDropDownLineCount ();

Returns

the number of visible lines in drop down mode.

setDropDownLineCount

Syntax

oneway void setDropDownLineCount (
short nLines );

Description

sets the number of visible lines for drop down mode.


makeVisible

Syntax

oneway void makeVisible (
short nEntry );

Description

makes the item at the specified position visible by scolling.

Top of Page