I'm trying to minimize windows as a button at a taskbar - which is actually a toolbar but I couldn't add button dynamically to the taskbar. I tried calling doLayout() function but it didn't work either.
Here's what I tried - any help will be appreciated a lot!
Thanks in advance.
<script type="text/javascript">
this.addListener('show', function(win) {
taskbar.add(me.taskButton);
taskbar.doLayout();
});
</script>
Variables :
- win : The window that will be minimized
- taskbar : A toolbar that is rendered at south region of my viewport
add. I would look into how the listener is getting attached, inspect the DOM in firebug (or equivalent) and verify that it is getting attached. Also what does yourtaskButtonconfig look like? Is thetaskButtongetting created withExt.createbefore you are trying to add it to the toolbar? - egerardusconsole.log(win)in the function and see if anything comes out when you show your window. - egerardus