dhtmlxtoolbar buttonSelect item after clicked

Hi,

I’m using buttonSelect inside my toolbar, my question is after I choose one of the select items of the button , the item remains as ‘selected’ (it’s color changes to yellow when selected) - by that I mean that when I open again the select list f the button I see the last selected item. I want the list to be ‘clean’ from last selected (to yellow items).

how is it possible to unselect the item after it was selected?

Thank’s In Advance.

Hi,

you may set “false” as the 7th paremter of the addButtonSelect method:

toolbar.addButtonSelect(id,index, text, options, image, imageDis, “false”);

Hi,

I forgot to say that I’m initializing the toolbar from xml and not by using
‘toolbar.addButtonSelect(id,index, text, options, image, imageDis, “false”);’.

is there any way do write it inside the xml file? or setting it after the toolbar was loaded?

Thank’s again.

Hi,

you may disable renderSelect in the xml:

<item type=“buttonSelect” renderSelect=“false” …>

HI,

It works great! thank’s!

Is there somthing like this for dhtmlxtree? after i select a tree item I would like it to be unseleted, Can this be also achived?

Thank’s again.

Try clearSelection method:

var t; tree.attachEvent("onSelect",function(){ if(t) window.clearTimeout(t) t = window.setTimeout(function(){ tree.clearSelection() },200); });