I looked at the docs and didn’t see anything but I thought i would ask anyway.
Are there any functions on the Desktop window to perform “window” functions such as tile, cascade, and docking a windows on the left or right when a window hovers over the edge ?
Hi Edmond,
You are correct that Wisej keeps the client and server in sync. But that is for the entire widget (on the client) related to the component (on the server). Think of Wisej on the client as a layout engine. It receives metadata from the server and creates a javascript/dom representation on the client. The client objects are more complex than their server counter part and the rendering is entirely done on the client.
In this case it’s a lot better to add the functionality to the client side. The layout engine for the workspace in the desktop runs on the client, which is a lot more flexible than the server. See attached sample, it shows you how to add functions to wisej.web.Desktop and how to extend the Wisej.Web.Desktop component.
It’s very easy and very clean. You can organize the files by name or by folder and Wisej takes care of binding everything together.
HTH
/Luca
Hi again Edmond.
I attach one of the ways of doing it.
Hi Edmond,
Please have a look at JavaScript documentation.
There are no built in methods for that. The wisej.web.Desktop is a widget that manages the floating windows in a child widget named “workspace”. The workspace uses the qx.ui.layout.Canvas layout engine. So you can basically achieve anything quite easily. I tried this with the CodeProject sample:
Maximized the forms, or Wisej will update the client with the forms coordinates.
Assuming there are two windows (in javascript, where “this” is the desktop, otherwise use the global reference App.Desktop):
// dock window 1 to the left using half of the workspace
this.getWindows()[0].setLayoutProperties({left:0, right:”50%”, top:0, bottom:0});
// dock window 2 to the right using half of the workspace
this.getWindows()[1].setLayoutProperties({left:”50%”, right:0 top:0, bottom:0});
Given the enormous flexibility of the framework you can achieve just about anything.
Please login first to submit.