Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Andrew on Jul 25, 2008 14:44
open dhtmlx forum
toolbar - selectbutton

I have three questions regarding the SelectButton

1- Using the xml configuration file, how would I set the initial state has "hidden" of a SelectButton?

2- What is the toolbar method (example please) to then set this SelectButton as "visible"?

3- Using the xml configuration file, how can I set an item in the SelectButton list as selected (it defaults to the top item in the list, but I would like to initially select a different item)

Thanks!

-Andrew
Answer posted by Support on Jul 28, 2008 03:35
>>1- Using the xml configuration file, how would I set the initial state has "hidden" of a SelectButton?
There is no way to define button as hidden in XML. Button can be set only in disabled state ( by using "disabled" attribute )
Can be done by js command as
    toolbar.loadXML(url,function(){
       toolbar.hideItem("some_id");
    });

>>2- What is the toolbar method (example please) to then set this SelectButton as "visible"?
    toolbar.hideItem(id);
    toolbar.showItem(id);

>>3- Using the xml configuration file, how can I set an item in the SelectButton list as selected
    Not possible from XML, can be done only by js command
    toolbar.getItem(id).setSelected(value);