Desktop window functions

0
0

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 ?

  • edmond girardi
    Desktop style WiseJ seems to be most like the traditional MDI style applications where you could use ” this.LayoutMdi(System.Windows.Forms.MdiLayout.Cascade)” for example to arrange windows/forms. I see in the docs that it is defined in WiseJ.Web – but does this apply to the Desktop style forms ?
  • You must to post comments
0
0

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.

 

 

 

 

  • edmond girardi
    So if i’m understanding this – I should be doing this via javascript at the client side. Where exactly would I put the javascript ? in default.html ?
  • You must to post comments
0
0

Hi Edmond,

Please have a look at JavaScript documentation.

  • You must to post comments
0
0

Hi again Edmond.

I attach one of the ways of doing it.

Attachment
  • edmond girardi
    After looking at this and the other responses, I have a question – since it appears that WiseJ will get messages to the server If i manipulate the window positions on the client side, and vie-versa -I guess it does not make a difference if i just do it from the server side and avoid the need for the javascript- does not appear to be any more effecient. Am I correct in this assumption ?
  • You must to post comments
0
0

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

  • You must to post comments
Showing 4 results
Your Answer

Please first to submit.