an area where the user can type some text:
The following syntax shows the user how an Input item can be easily added:
myToolbar.addInput(id, pos, value, width);
This method has the following input parameters:
Note: if the user wants the Input item to be created text-free, it's necessary to write an empty string as value parameter. For example:
myToolbar.addInput("input_new",3,"",100);
Related sample: Input creation
The following methods that are available for the Button item, can be applied to the Input Item as well:
Related sample: Input manipulation
All the parameters of the above mentioned methods are the same as those described in Button Settings Manipulations section.
The following methods that are available for the Slider item, can be applied to the Input Item as well:
All the parameters of the above mentioned methods are the same to those described in Slider Settings Manipulations section.
There's one more method applied to Select Button that can be applied to the Input Item as well:
All the parameters of the above mentioned method are the same to those described in Setting Select Button Width section.
The current input's width can be got with the help of getWidth method:
// returns current input's width
var width = myToolbar.getWidth(id);
Back to top