PDA

View Full Version : Minimize window to taskbar



neosky
7 May 2015, 5:30 AM
Hello i am have desktop app, and i am want minimize my window (extend: 'Ext.window.Window') to taskbar, but when i am input to my window:
minimizable: true in window tool with minimize will appear. When i am click this tool nothing happens. How minimize window to taskbar?

jmin91
7 May 2015, 5:41 AM
The docs say you have to provide your own implementation. In short - there's no default functionality behind it so you have to code your own event for it. Check this out... http://docs.sencha.com/extjs/5.1/5.1.0-apidocs/#!/api/Ext.window.Window-cfg-minimizable I've never done this before but what I would do is define a click event for the button. In the event try something like...



win.collapse();

neosky
8 May 2015, 4:23 AM
The docs say you have to provide your own implementation. In short - there's no default functionality behind it so you have to code your own event for it. Check this out... http://docs.sencha.com/extjs/5.1/5.1.0-apidocs/#!/api/Ext.window.Window-cfg-minimizable I've never done this before but what I would do is define a click event for the button. In the event try something like...



win.collapse();


that is, I must first collapse my window and then create in toolbar button with name of my window, and then when i am click this button window show? I am think Ext have prepared solution for this.

jmin91
8 May 2015, 4:42 AM
Sounds about right, hope it works.

tristan.lee
11 May 2015, 4:30 AM
Here's another related thread: https://www.sencha.com/forum/showthread.php?194912-How-to-minimize-Ext-Window As mentioned, you will need to implement this yourself. Also take a look at the examples/desktop/ code to see how it was implemented there.

neosky
12 May 2015, 1:05 AM
Here's another related thread: https://www.sencha.com/forum/showthread.php?194912-How-to-minimize-Ext-Window As mentioned, you will need to implement this yourself. Also take a look at the examples/desktop/ code to see how it was implemented there.
thanks, but in example i see only example, where i am look source code of examples/desktop/?

tristan.lee
12 May 2015, 6:28 AM
Check out this example: http://docs.sencha.com/extjs/5.1/5.1.0-apidocs/source/Desktop.html#Ext-ux-desktop-Desktop-method-createWindow

You can see the functionality when creating a window that it also creates a taskbar button, and on minimize, it animates the window down to the taskbar button element. This simulates minimizing to the taskbar.

tristan.lee
12 May 2015, 6:33 AM
That link is for Ext 5, but the Ext.ux.desktop.Desktop class is similar functionality to the example that's includes in the examples/desktop/js/Desktop.js file.