2

When I minimize a window in qooxdoo, where does it go? Is there a way to get it to stick to the bottom of the main application window?

Thanks!

Jonathan
  • 894
  • 2
  • 9
  • 20

2 Answers2

3

There is no built-in support for this, you need to roll your own. Basically, subclass window.Window to overwrite the iconify action to simply hide the window. Then, you need a container (e.g. off of window.Desktop) that represents the iconified window (e.g. with a small image), and displays it again when the icon is clicked. [1]

ThomasH
  • 22,276
  • 13
  • 61
  • 62
  • Thanks @ThomasH for the info and link. It would be a nice addition to the Qx framework :-) Most people who use the app I wrote with Qooxdoo really like its visual appeal, but that is one question they always ask... "Where does the window go when I minimize it" and I didn't know the answer ;-) – Jonathan Jun 29 '12 at 16:10
  • where does the light go when you close the fridge :-) – Tobi Oetiker Jun 29 '12 at 22:03
3

a very simple solution to this problem is to add a toolbar to the bottom of your desktop. When you add a window you also add a toolbar button. Using a few event handlers you can hook the two together ... and show the toolbar buttons only when the window is minimized ...

A very simple example to show the concept

var win = new qx.ui.window.Window("First Window").set({
  width: 300,
  height: 300,
  allowClose: false,
  allowMaximize: false
});

var doc = this.getRoot();

var showBtn = new qx.ui.form.Button('Show Window').set({
  visibility: 'excluded'
});

// Add button to document at fixed coordinates
doc.add(showBtn, {
  left : 100,
  top  : 50
});

showBtn.addListener("execute", function(e) {
  showBtn.setVisibility('excluded');
  win.open();
});

doc.add(win, {left:20, top:20});

win.addListener('minimize',function(){
    showBtn.setVisibility('visible');
});

win.open();
Tobi Oetiker
  • 5,167
  • 2
  • 17
  • 23