# eric6.E5Gui.E5TextSpinBox

Module implementing a spinbox with textual entries.

### Global Attributes

None

### Classes

E5TextSpinBox | Class implementing a spinbox with textual entries.

### Functions

None

## E5TextSpinBox

Class implementing a spinbox with textual entries.

### Derived from

QSpinBox

### Class Attributes

None

### Class Methods

None

### Methods

E5TextSpinBox | Constructor
addItem | Public method to add an item with item data.
currentIndex | Public method to retrieve the current index.
itemData | Public method to retrieve the data associated with an item.
textFromValue | Public method to convert a value to text.
valueFromText | Public method to convert a text to a value.

### Static Methods

None

#### E5TextSpinBox (Constructor)

E5TextSpinBox(parent=None)

Constructor

parent
  reference to the parent widget (QWidget)

#### E5TextSpinBox.addItem

addItem(txt, data=None)

Public method to add an item with item data.

txt
  text to be shown (string)
data
  associated data

#### E5TextSpinBox.currentIndex

currentIndex()

Public method to retrieve the current index.

Returns:
  current index (integer)

#### E5TextSpinBox.itemData

itemData(index)

Public method to retrieve the data associated with an item.

index
  index of the item (integer)

Returns:
  associated data

#### E5TextSpinBox.textFromValue

textFromValue(value)

Public method to convert a value to text.

value
  value to be converted (integer)

Returns:
  text for the given value (string)

#### E5TextSpinBox.valueFromText

valueFromText(txt)

Public method to convert a text to a value.

txt
  text to be converted (string)

Returns:
  value for the given text (integer)

Up