MDI Window

Welcome to Wisej Support.
Questions, suggestions and plain old bugs - are all welcome here!
0
0

Hi,

I’m trying to replace the so-called “Workspace Tabs” of Visual WebGui. This was basically a TabControl, which also had a “close tab” functionality, and it allowed for multiple “forms” to be hosted in individual tabs and, therefore, be available to the user at the same time. Something like an MDI form on WinForms.

So the MDI window of Wisej sounds like the prefect candidate for this replacement. As I discovered, a Wisej MDI window is just another plain window with its .IsMdiContainer property set to true. I can create Forms at run-time and add them to the parent MDI form by setting their .MdiParent property to the MdiContainer form. Then these child windows show up as tabs inside the MdiContainer. A great feature of this container is the last tab which contains “pictures” of all the other currently open tabs, and from which one can get a quick visual overview of the open tabs and select the desired one to activate (i.e. bring to the front to work with).

Now this “activate” point is that I miss:  I can’t find a way to catch the event of activating a tab. Neither the “MdiChildActivate” or “TabIndexChanged” events of the MdiContainer fire.

Questions:

  1. Is there some other event I’m missing?
  2. Apart from the tabular form, is there the possibility for seeing the individual windows as “tiles” or “cascading” as in Windows Forms ? (System.Windows.Forms.MdiLayout enumeration)
  3. Am I using the correct control for the replacement or should I be using the plain TabControl ?

 

As a general point, I find the form/window term very confusing. What I mean is “Project –> Add New Item –> Empty Window” gives me a new instance of the Form class. The confusion probably comes from my Visual Webgui background where a Form was more what in Wisej is a “page”. I suppose the WinForms equivalent is a “Form”, i.e. “Project –> Add New Item –> New Form”. But of course I may be the only one who is confused!

All the best,

Alex

  • You must to post comments
0
0

Hi Alex,

WJ-7412 is fixed in our latest build (1.2.22).

Best regards
Frank

  • You must to post comments
0
0

Hi Alex,

first an answer to your question regarding the close button on MDI tabs:

You can’t handle the tabs in the tabbed mdi directly. They are wired to the relative mdi child form. The close button on the tab corresponds to the close button on the form, to remove it set form1.ControlBox = false – before setting form1.MdiParent.

For the problem of not showing the form icon in the MdiTabView I have logged WJ-7412.

Thanks,
Frank

  • You must to post comments
0
0

… and, since we are still talking about MDI, can we add an image on each MDI tab ? Before or after its Text? I tried setting the Form.Icon or Form.IconSource properties but nothing showed up.

In fact, forgetting the MDI, I set the Form.ImageSource property of a window form to the path to a gif file, the Window title moved to the right to accommodate for the icon, but the icon didn’t show up.

Best,
Alex

  • You must to post comments
0
0

Dear Frank and Luca,

All 3 bugs are confirmed fixed!

And now …., how can I hide the close button on individual MDI tabs? 🙂

Alex

  • You must to post comments
0
0

Alex,

all three bugs (WJ-7402, WJ-7403, WJ-7404) have been fixed in our latest beta (1.2.19).

Best regards
Frank

  • You must to post comments
0
0

Dear Luca,

Thank you for your answers.

Forget the cascading, I just wanted to know if it is there and I can’t see it, just out of curiosity. I don’t think it’s a useful view anyway.

Alex

  • You must to post comments
0
0

Hi Alex,

I’ll address the questions individually:

  • TabIndexChanged is the event fired when the TabIndex property is changed and should be hidden in Form and Page. This is bug WJ-7403. There are other inherited events that have to be hidden. They are still functional when the form is used as a child control, but should be hidden in the designer.
  • MdiChildActivate should be fired but it’s not: bug WJ-7402.
  • We don’t have the cascading view for mdi children. The tabbed mdi was one of the first things we had to add to VWG when we used it on projects, every customer asked to get rid of the mdi cascade view. It can be added, but it’s not on the list now.
  • VWG had only one window class Gizmox.WebGUI.Forms.Form. It acted as a page when assigned to Global.Context.MainForm. Otherwise it was a floating window. It could also be minimized, causing the creation of a simple taskbar with the minimized forms. In Wisej we have Wisej.Web.Form which is always a floating window (unless created as a child control or an mdi child – like in VWG or WinForms), the Wisej.Web.Page which is always a single page and always fills the browser, and the Wisej.Web.Desktop wich can fill the browser when assigned to Application.Desktop or behave as a child control. The desktop is the only control that can handle minimized forms. Otherwise they are simply hidden and you have to manage them depending on your code. We separated the classes to avoid issues with the caption, buttons, tools in the caption, borders, etc.

And the last answer, related to the more important question is:

The close functionality is already included in the TabControl. You can enable/disable it for the individual tab setting the TabPage.ShowCloseButton property. And should be automatically there for the tabbed mdi. It can also be turned on/off in the theme. And I just noticed that now is not visible anymore. Logged as WJ-7404.

So you got 3 bugs with 1 post!

Thank you.

Luca

 

  • You must to post comments
Showing 7 results
Your Answer
Post as a guest by filling out the fields below or if you already have an account.
Name*
E-mail*
Attachment
File Name Size
There are currently no files uploaded.
Maximum number of files 5, maximum file size 3.9MB.
Supported file formats: zip pdf gif jpg bmp png cs vb theme json