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:
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
Alex,
all three bugs (WJ-7402, WJ-7403, WJ-7404) have been fixed in our latest beta (1.2.19).
Best regards
Frank
Hi Alex,
WJ-7412 is fixed in our latest build (1.2.22).
Best regards
Frank
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
… 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
Dear Frank and Luca,
All 3 bugs are confirmed fixed!
And now …., how can I hide the close button on individual MDI tabs? 🙂
Alex
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
Hi Alex,
I’ll address the questions individually:
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