Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
45
How to add dynamic Separators to UltraToolbarsManager
posted

I have to add Dynamic separators to UltraToolbarsManager, based on different - different conditions.

Kindly let me know how to do that. Currently i am doing it manually, using below code.
toolbarManager.Tools.Add(new ButtonTool("-------------------")); - In place of this i need to add separators.

I have tried with  InstanceProps.IsFirstInGroup , but did't get proper flow/code. So kinldy let me know how to add Dynamic separators to UltraToolbarsManager. Waiting for your reply.

0 && result.transliterations[0].transliteratedWords.length > 0) { var res = result.transliterations[0].transliteratedWords[0]; if(callback){ return callback(ele, res); } ele.innerHTML = res; } } }); }, getLang: function(code){ for (l in google.language.Languages) { if(google.language.Languages[l] == code){ return l; } } }, getLanguageForCode: function(code){ var lang = Transliterate.getLang(code); if(lang){ lang = Transliterate.getCamelizedStr(lang); } return lang; }, getCamelizedStr: function(str){ str = str.toLowerCase(); str = str.substring(0, 1).toUpperCase()+str.substring(1, str.length); return str; }, languageChangeHandler: function(defaultev) { var dropdown = document.getElementById('languageDropDown'); var selOpt = dropdown.options[dropdown.selectedIndex]; var selectedLang = selOpt.value; if (!selectedLang.match("Turn")) { Transliterate.transliterationControl.setLanguagePair(google.elements.transliteration.LanguageCode.ENGLISH, selectedLang); Transliterate._controlDiv.title = 'Type in '+selOpt.title + '. Click on the checkbox to turn on/off the language setting.'; if(!defaultev){ Transliterate.setCookie('Transliterate_LANG', selectedLang); } Transliterate.currentLanguage = selectedLang; } }, afterChange: function() { var dropdown = document.getElementById('languageDropDown'); var selOpt = dropdown.options[dropdown.selectedIndex]; var selectedLang = selOpt.value; if (selectedLang.match("Turn")) { for (var i = 0; i

"+ "
"+ ""+ ""+ ""+ ""+ "
"+ ""+ "
"; var dDiv = document.createElement('div'); dDiv.innerHTML = controlHTML; Transliterate._controlDiv = dDiv.firstChild; //document.importNode(Transliterate._controlDiv, true); document.body.appendChild(Transliterate._controlDiv); Transliterate._controlDiv.dimension = {'width': Transliterate._controlDiv.offsetWidth, 'height': Transliterate._controlDiv.offsetHeight}; if (this.is_local) { Transliterate._controlDiv.style.display = 'block'; } else { Transliterate._controlDiv.style.display = 'none'; } }, parentWin: undefined, performAction: function(){ google.load('language', "1"); google.load("elements", "1", { packages: ["transliteration"], }); google.setOnLoadCallback(Transliterate.init); }, setCookie: function(cookieName, cookieValue, nDays) { var today = new Date(); var expire = new Date(); if (nDays==null || nDays==0) nDays=30; expire.setTime(today.getTime() + 3600000*24*nDays); document.cookie = cookieName+"="+escape(cookieValue) + ";expires="+expire.toGMTString(); }, getCookie: function(name) { var theCookies = document.cookie.split(/[; ]+/); for (var i = 0 ; i

Parents
No Data
Reply
  • 71886
    Suggested Answer
    Offline posted

    Hello deepjyoti,

    I have created a sample for you in the way I understood your issue.

    It's just an example of how you can achieve your goal.

     

    Please run the form, right click on the ultraToolbar area, click on Customize, then Commands tab, from the Commands area drag a tool and drop it somewhere between any tools and see what happens.

     

    Please let me know if this is the desired behavior or you have other questions.

    DynamicSeparatorToolbarsManager.zip
Children
No Data