LibreOffice: XListBox Interface Reference

LibreOffice LibreOffice 26.8 SDK API Reference

Loading...
Searching...
No Matches
XListBox Interface Referencepublished

gives access to the items of a list box and makes it possible to register item and action event listeners. More...

`import "XListBox.idl";`

Inheritance diagram for XListBox:

## Public Member Functions
void | addItemListener ([in] com::sun::star::awt::XItemListener l)
| registers a listener for item events.
void | removeItemListener ([in] com::sun::star::awt::XItemListener l)
| unregisters a listener for item events.
void | addActionListener ([in] com::sun::star::awt::XActionListener l)
| registers a listener for action events.
void | removeActionListener ([in] com::sun::star::awt::XActionListener l)
| unregisters a listener for action events.
void | addItem ([in] string aItem, [in] short nPos)
| adds an item at the specified position.
void | addItems ([in] sequence< string > aItems, [in] short nPos)
| adds multiple items at the specified position.
void | removeItems ([in] short nPos, [in] short nCount)
| removes a number of items at the specified position.
short | getItemCount ()
| returns the number of items in the listbox.
string | getItem ([in] short nPos)
| returns the item at the specified position.
sequence< string > | getItems ()
| returns all items of the list box.
short | getSelectedItemPos ()
| returns the position of the currently selected item.
sequence< short > | getSelectedItemsPos ()
| returns the positions of all currently selected items.
string | getSelectedItem ()
| returns the currently selected item.
sequence< string > | getSelectedItems ()
| returns all currently selected items.
void | selectItemPos ([in] short nPos, [in] boolean bSelect)
| selects/deselects the item at the specified position.
void | selectItemsPos ([in] sequence< short > aPositions, [in] boolean bSelect)
| selects/deselects multiple items at the specified positions.
void | selectItem ([in] string aItem, [in] boolean bSelect)
| selects/deselects the specified item.
boolean | isMutipleMode ()
| returns TRUE if multiple items can be selected, FALSE if only one item can be selected.
void | setMultipleMode ([in] boolean bMulti)
| determines if only a single item or multiple items can be selected.
short | getDropDownLineCount ()
| returns the number of visible lines in drop down mode.
void | setDropDownLineCount ([in] short nLines)
| sets the number of visible lines for drop down mode.
void | makeVisible ([in] short nEntry)
| makes the item at the specified position visible by scrolling.
Public Member Functions inherited from XInterface
any | queryInterface ([in] type aType)
| queries for a new interface to an existing UNO object.
void | acquire ()
| increases the reference counter by one.
void | release ()
| decreases the reference counter by one.

## Detailed Description

gives access to the items of a list box and makes it possible to register item and action event listeners.

## Member Function Documentation

## ◆ addActionListener()

void addActionListener | ( | [in] com::sun::star::awt::XActionListener | l | ) |

registers a listener for action events.

## ◆ addItem()

void addItem | ( | [in] string | aItem,
|  | [in] short | nPos )

adds an item at the specified position.

## ◆ addItemListener()

void addItemListener | ( | [in] com::sun::star::awt::XItemListener | l | ) |

registers a listener for item events.

## ◆ addItems()

void addItems | ( | [in] sequence< string > | aItems,
|  | [in] short | nPos )

adds multiple items at the specified position.

## ◆ getDropDownLineCount()

short getDropDownLineCount | ( |  | ) |

returns the number of visible lines in drop down mode.

## ◆ getItem()

string getItem | ( | [in] short | nPos | ) |

returns the item at the specified position.

## ◆ getItemCount()

short getItemCount | ( |  | ) |

returns the number of items in the listbox.

## ◆ getItems()

sequence< string > getItems | ( |  | ) |

returns all items of the list box.

## ◆ getSelectedItem()

string getSelectedItem | ( |  | ) |

returns the currently selected item.

When multiple items are selected, the first one is returned. When nothing is selected, an empty string is returned.

## ◆ getSelectedItemPos()

short getSelectedItemPos | ( |  | ) |

returns the position of the currently selected item.

When multiple items are selected, the position of the first one is returned. When nothing is selected, -1 is returned.

## ◆ getSelectedItems()

sequence< string > getSelectedItems | ( |  | ) |

returns all currently selected items.

## ◆ getSelectedItemsPos()

sequence< short > getSelectedItemsPos | ( |  | ) |

returns the positions of all currently selected items.

## ◆ isMutipleMode()

boolean isMutipleMode | ( |  | ) |

returns TRUE if multiple items can be selected, FALSE if only one item can be selected.

## ◆ makeVisible()

void makeVisible | ( | [in] short | nEntry | ) |

makes the item at the specified position visible by scrolling.

## ◆ removeActionListener()

void removeActionListener | ( | [in] com::sun::star::awt::XActionListener | l | ) |

unregisters a listener for action events.

## ◆ removeItemListener()

void removeItemListener | ( | [in] com::sun::star::awt::XItemListener | l | ) |

unregisters a listener for item events.

## ◆ removeItems()

void removeItems | ( | [in] short | nPos,
|  | [in] short | nCount )

removes a number of items at the specified position.

## ◆ selectItem()

void selectItem | ( | [in] string | aItem,
|  | [in] boolean | bSelect )

selects/deselects the specified item.

## ◆ selectItemPos()

void selectItemPos | ( | [in] short | nPos,
|  | [in] boolean | bSelect )

selects/deselects the item at the specified position.

## ◆ selectItemsPos()

void selectItemsPos | ( | [in] sequence< short > | aPositions,
|  | [in] boolean | bSelect )

selects/deselects multiple items at the specified positions.

## ◆ setDropDownLineCount()

void setDropDownLineCount | ( | [in] short | nLines | ) |

sets the number of visible lines for drop down mode.

## ◆ setMultipleMode()

void setMultipleMode | ( | [in] boolean | bMulti | ) |

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

The documentation for this interface was generated from the following file:

- com/sun/star/awt/XListBox.idl