Check documentation for the latest version of dhtmlxSuite Text Control DHTMLX Docs

Text Control

an item that contains some text displayed in the item display area:

Adding Text Item

A Text Item can be added to the toolbar by calling addText method:

myToolbar.addText(id, pos, text);

The following parameters should be passed to this method:

  • id - id of the new item;
  • pos - position of the text item;
  • text - label of the text item.

Related sample:  Text creation

Working with Text Item

The following methods that are available for the Button item, can be applied to the Text Item as well:

Showing/Hiding Text

  • myToolbar.showItem(id);
  • myToolbar.hideItem(id);
  • myToolbar.isVisible(id);

Related sample:  Text manipulation

Setting/Getting Text

  • myToolbar.setItemText(id, text);
  • myToolbar.getItemText(id).

Related sample:  Text label

All the parameters of the above mentioned methods are the same as those described in Button Settings Manipulations section.

Back to top