GUI Design Help!

All topics not related to another forum.

Moderators: Phil Wright, Chris Porter

GUI Design Help!

Postby RedBull » Wed Mar 11, 2009 3:31 pm

Hallo,

we are completely new to the Component Factory Win Forms Controls, just bougt them this week :D

I have to rebulid a 10 year old ERP MS Access application which has a lot of different forms and thats exactly my problem!

Whats the best way to design a GUI which has a Krypton Navigator Outlook Style navigation on the left side of the form which switches different Forms / Panels on the right side?

What I tried to do is the following:

1) Krypton Form
2) Krypton Split Container with Krypton Navigator in the left panel
3) On the rightpanel I tried to place Krypton Panels over and under to switch between them

Switching between the panels does not work when they are placed exactly over and under!

I also tired this with the KryptonHeaderGroup without success!

Perhaps I am on the wrong way to build the GUI :(

I hope you can help me on the way to design my GAU!

Thanks and greetings from AUSTRIA
Martin
RedBull
 
Posts: 1
Joined: Wed Mar 11, 2009 3:05 pm

Re: GUI Design Help!

Postby Phil Wright » Wed Mar 11, 2009 7:19 pm

You should try placing a KryptonNavigator on the right hand side with one page per form you want to show. Then set the Navigator mode to be Panel so that it only shows the contents of the selected page but no tabs or buttons. Then you just change the Navigator.SelectedPage to whatever page you want displayed.
Phil Wright
Site Admin
 
Posts: 2720
Joined: Thu Apr 13, 2006 2:55 pm
Location: Melbourne, Australia

Re: GUI Design Help!

Postby Chris Porter » Thu Mar 12, 2009 12:10 am

Phil is definitely correct on this. Use a KryptonNavigator set to Dock = Fill on the right side of the KryptonSplitContainer. From there you can do as he suggested and have the Navigator set to Panel mode so it doesn't interject any visible UI features, it acts only as the container for your pages. Another option is to set it to one of the Header Group modes and use it to display the title bar for your pages. If you go the first route, you'll likely want to use KryptonHeaderGroups as the first level container for each page so that it matches visually with the Outlook style menu.

To change the pages, grab the SelectedPageChanged event of the menu, evaluate what page is now active, and then set the content navigator's selected page accordingly. Something like this:
Code: Select all
MenuKryptonNavigator_SelectedPageChanged(ByVal sender as Object, ByVal e As System.EventArgs)
    Select Case (MenuKryptonNavigator.SelectedPage.Name.ToString())
        Case "MenuKryptonPage1"
            ContentKryptonNavigator.SelectedPage = ContentKryptonPage1
        Case "MenuKryptonPage2"
            ContentKryptonNavigator.SelectedPage = ContentKryptonPage2
        Case "MenuKryptonPage3"
            ContentKryptonNavigator.SelectedPage = ContentKryptonPage3
    End Select
End Sub

My personal preference to keep your code nice and clean is to use UserControls for each of the pages. When the main form loads, you create an instance of ContentUserControl1, add it to the ContentKryptonPage1.Controls collection, set it to Dock = Fill, and repeat for each UserControl.

You can also save yourself some design-time hassle by setting your ContentKryptonNavigator mode to show the page buttons of some sort during design-time and then at run-time setting it to the desired mode for operation. This allows you interact with the navigator in the design pane without having to go to the properties window to change the selected page.

On a side note, I just finished my morning RedBull.
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 0 guests

cron