[SOLVED] Window vs Page vs Form

Answered Closed
0
0

Hi,

As I understand, Page is an “object” that takes up the whole browser viewport, Window is an object that can be closed/resized/minimized. But there is also a Form object. What is its purpose?

Best regards,

Alex

  • You must to post comments
Best Answer
0
0

In terms of top level controls we have:

  • Page. Which, as you wrote, covers the entire browser. There can be only one active page at a time. You can create as many pages as you like, but obviously only one can be visible. You can switch (navigate, in a way) by using Application.MainPage = page1. Or by calling Show() on the page, which will also change Application.MainPage. Switching pages gives a very nice navigation impression (we could add animations in the future).
  • Form. Which is what I call Window sometimes. I wanted to call the class Window originally. A Form (or window) will always show in front of a Page.
  • Desktop. The desktop control is similar to a  page. There can be only one active. You can show a desktop using Application.Desktop = desktop1. A desktop, when present, manages (minimize, thumbnails) all the forms. A desktop can be a child of a page but not of a form. A page can be designed in a way that it has desktop within, which can host the forms. When you switch a desktop, all the forms are automatically transferred to the new desktop.

The fourth control that can be designed is the UserControl. All it means is that it’s a design surface. Otherwise any control can have child controls.

We’ll add a fifth “designable” control as an extension: PopupControl. It will have a design surface, like the UserControl, and new properties to let you “hook” it to another control. So basically the PopupControl will allow you to add a ComboBox-like dropdown panel to anything.

 

HTH

Best,

Luca

 

  • You must to post comments
0
0

It uses the existing popup widget in qooxdoo – which is also the container used for the combo dropdown and all the popups in wisej. You design it as a UserControl then you can instantiate it and link it to any control and you can define the alignment style.

pooup1.Opener = textBox1;

popup1.Alignment = ContentAlignment.MiddleTop;

popup1.ActivationMode = PopupActivaton.OnRightClick;

The popup now is displayed at the specified relative location when the user right clicks textBox1 and it’s automatically closed like a context menu or a drop down.

You can also show it or hide it programmatically. And it tracks the location if the opener is moved.

It lets you add a dropdown/context custom panel to any control.

Best,

Luca

 

  • You must to post comments
0
0

Hi Luca,

I don’t quite the idea of the PopupControl. How is it intended to be used?

  • You must to post comments
Showing 3 results