Hello. How can I make buttonInput element readonly?
tried
no effect
There is not readonly mode for input. You may try to use userdata in the xml:
<item id="gm_value" type="buttonInput" value="" width="60" title="">
<userdata name="disabled">1</userdata>
</item>
And for items where it is set apply one of the following approaches:
- disable an item:
toolbar.loadXML(url, function(){
toolbar.forEachItem(function(id){
if(toolbar.getUserData(id,"disabled"))
toolbar.disableItem(id);
})
});
- make item readonly using private properties:
toolbar.loadXML(url, function(){
toolbar.forEachItem(function(id){
if(toolbar.getUserData(id,"disabled"))
toolbar.objPull[toolbar.idPrefix+id].obj.firstChild.readOnly = true;
})
});