Manfred
#1
can i set the cursor focus at the Toolbar buttoninput element ?
eg. dokument.getElementByID(“suchfeld”).focus() or toolbar.focusItem(“suchfeld”) …
xml:
<toolbar>
<item id="suchfeld" type="buttonInput" value="" width="50" />
</toolbar>
and execute html (asp)
<div id="toolbarObj"></div>
<script>
var toolbar;
toolbar=new dhtmlXToolbarObject("toolbarObj");
toolbar.setIconsPath("../_common/imgs/");
toolbar.focusItem("suchfeld");
</script>
There is no a public method to set focus.
You may try the following:
dhxToolbar.objPull[dhxToolbar.idPrefix+itemId].obj.firstChild.focus();
dhxToolbar - toolbar object,
itemId - the id of the input buttom
Manfred
#3
Thank’s for your information.
My Problem is solved.
// init toolbar
mainToolbar = mainSidebar.attachToolbar({
icons_size: 32,
icons_path: “imgs/toolbar/”,
items: [
{type: “text”, id: “title”, text: " "},
{type: “separator”, id: “sep4”},
{type: “text”, id: “texto”, text: “Buscar”},
{type: “buttonInput”, id: “inp”, text: “”, width: 120},
{type: “button”, id: “xx”, img: “ic_action_search.png”},
{type: “separator”, id: “sep2”},
{type: “spacer”},
{type: “separator”, id: “sep4”},
{type: “button”, id: “add”, img: “add.png”},
{type: “button”, id: “save”, img: “save.png”}
]
});
mainToolbar.objPull[mainToolbar.idPrefix+“inp”].obj.firstChild.focus();
works perfect! thanks!