Jonathan
Jonathan

Reputation: 914

Qooxdoo -- minimize window...where does it go?

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!

Upvotes: 2

Views: 445

Answers (2)

Tobi Oetiker
Tobi Oetiker

Reputation: 5460

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();

Upvotes: 3

ThomasH
ThomasH

Reputation: 23516

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]

Upvotes: 3

Related Questions