- Main Page
- Classes
- Directories
- Related Pages

- Class List
- Class Hierarchy
- Class Members

# TkListbox Class Reference

Represent "listbox" widget. More...

`#include <tk_listbox.h>`

Inheritance diagram for TkListbox:

List of all members.

## Public Member Functions

const Ptr< TkOptionDef > * | getOptionAll () const
| Returns array of all avaliable options valid for specific widget type.
const char * | getType () const
| Return type of class.
const char * | getTkClass () const
| Returns type of widget.
TObject * | clone ()
| Create deep-clone of object.
void | setVariable (TclListVar *variable)
int | getCursor ()
void | deleteItem (int firstIndex, int lastIndex)
void | deleteItem (int index)
string & | get (int index)
void | create ()
| Creates widget in shell.
void | setEventsEnabled (bool value)
| Enables or disables events on widget.
void | setBackgroundColor (TkColorOption *color)
| Set background color.
Ptr< TkColorOption > & | getBackgroundColor () const
| Returns background color of widget.

## Detailed Description

Represent "listbox" widget.

Date:
  01-12-2006

Author:
  Ondrej Svejdar

Todo:

Bug:

## Member Function Documentation

TObject * TkListbox::clone | ( |  | ) | `[virtual]`

| Create deep-clone of object.

Returns:
  deep-clone of object

Implements TkBase.

void TkListbox::deleteItem | ( | int | index | ) | `[inline]`

| Delete single item from listbox

Parameters:

  | index | index of item

void TkListbox::deleteItem | ( | int | firstIndex,
|  | int | lastIndex
| ) | `[inline]`

| Delete range of items from listbox

Parameters:

  | firstIndex | index of first item
  | lastIndex | index of last item

string& TkListbox::get | ( | int | index | ) | `[inline]`

Parameters:

  | index | index of item

Returns:
  item at index index

Ptr< TkColorOption > & TkListbox::getBackgroundColor | ( |  | ) | const`[virtual]`

| Returns background color of widget.

Returns:
  background color

Implements TkBase.

int TkListbox::getCursor | ( |  | ) | `[inline]`

Returns:
  cursor position of selected item, items are indexed from top, starting from index 0, -1 means no selected item

const Ptr< TkOptionDef > * TkListbox::getOptionAll | ( |  | ) | const`[virtual]`

| Returns array of all avaliable options valid for specific widget type.

Returns:
  array of options

Implements TkBase.

const char * TkListbox::getTkClass | ( |  | ) | const`[virtual]`

| Returns type of widget. Example values are "button","menu","entry" etc.

Returns:
  widget type

Implements TkBase.

const char * TkListbox::getType | ( |  | ) | const`[virtual]`

| Return type of class.

Returns:
  type of class

Reimplemented from TXmlObject.

void TkListbox::setBackgroundColor | ( | TkColorOption * | color | ) | `[virtual]`

| Set background color.

Parameters:

  | color | color value

Implements TkBase.

void TkListbox::setEventsEnabled | ( | bool | value | ) | `[inline, virtual]`

| Enables or disables events on widget.

Parameters:

  | value | if true events will be enabled

Reimplemented from TkBase.

void TkListbox::setVariable | ( | TclListVar * | variable | ) | `[inline]`

| Synchronize own variable with list, this variable has got value of item

Parameters:

  | variable |

The documentation for this class was generated from the following files:

- H:/projs/dotNET/eda/src/tk/gui/tk_listbox.h
- H:/projs/dotNET/eda/src/tk/gui/tk_listbox.cpp