How to convert MDI to SDI using Krypton?

All topics not related to another forum.

Moderators: Phil Wright, Chris Porter

How to convert MDI to SDI using Krypton?

Postby MisterT » Wed Sep 24, 2008 11:24 am

Hello,

I love the Kryton products, and I would like to convert a MDI program to SDI using Krypton. It seems like using the Krypton Navigator would be a good way to go, but moving an MDI program to Navigator seems like a huge overhaul.

Question:
What would be a good approach to move and MDI application to Navigator?

Thanks for any ideas.
Tom
MisterT
 
Posts: 7
Joined: Fri Jan 25, 2008 5:37 am
Location: Texas, USA

Re: How to convert MDI to SDI using Krypton?

Postby Phil Wright » Wed Sep 24, 2008 1:13 pm

I would actually suggest that using the Workspace would be a better alternative. That allows the user to move pages around and change the layout so they can see more than one page at a time. That is closer to the MDI approach.
Phil Wright
Site Admin
 
Posts: 2720
Joined: Thu Apr 13, 2006 2:55 pm
Location: Melbourne, Australia

Re: How to convert MDI to SDI using Krypton?

Postby Chris Porter » Thu Sep 25, 2008 12:35 am

Assuming your child forms are in fact forms, you should be able to easily convert them to UserControls by modifying the form.cs/vb and form.designer.cs/vb file to inherit from UserControl instead of Form. From there you will add each UserControl to a KryptonPage in the main navigator. This could be done through the designer if you have a fixed number of form instances or in code if they are created through user actions.

If you don't need the tabs at the top, try setting the Navigator mode to either Panel or Group depending on if you need a border. A "best practice" that I use in this situation is to leave the Navigator in a tab mode of some sort in the designer and switch it to the other view at runtime. This allows me easier control and navigation through of the navigator and its pages at design time.

EDIT: The Form -> UserControl suggestion should still apply if you go with the Workspace instead of the Navigator.
Chris Porter
 
Posts: 714
Joined: Fri Oct 12, 2007 5:39 am
Location: Oklahoma City, OK, US


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron