Hi
I have a toolstrip in my editor toolbar which contains several items. When my editor looses focus I want to disable (or hide) some of the toolstrip sub options subject to misc business logic (e.g. in scenario below say I want to disable the "Do That" option)
My tools file is something like :
I was expecting to be able to write some javascript similar to that below but the editor API doesn't seem to allow me to do it and i cannot figure it out :
I have noticed that there is a .getTools() method but all this seems to return me is an array of name/value pairs thus I cannot hide/disable my toolstrip suboptions.
Can you adivise on how to achieve this ?
Thanks in advance
I have a toolstrip in my editor toolbar which contains several items. When my editor looses focus I want to disable (or hide) some of the toolstrip sub options subject to misc business logic (e.g. in scenario below say I want to disable the "Do That" option)
My tools file is something like :
<
root
>
<
tools
IsRibbon
=
"true"
>
<
EditorToolStrip
Name
=
"MyToolStrip"
PopupHeight
=
"90px"
>
<
EditorTool
Name
=
"DoThis"
Text
=
"Do This"
/>
<
EditorTool
Name
=
"DoThat"
Text
=
"Do That"
/>
<
EditorTool
Name
=
"DoOther"
Text
=
"Do Other"
/>
</
EditorToolStrip
>
</
tools
>
</
root
>
I was expecting to be able to write some javascript similar to that below but the editor API doesn't seem to allow me to do it and i cannot figure it out :
editor.getToolByName(
"MyToolStrip"
).getToolByName(
"DoThis"
).setState(-1)
I have noticed that there is a .getTools() method but all this seems to return me is an array of name/value pairs thus I cannot hide/disable my toolstrip suboptions.
Can you adivise on how to achieve this ?
Thanks in advance