Thread: Navigating without Tabbers

  1. #1
    Registered User
    Join Date
    Jan 2008
    Posts
    244

    Navigating without Tabbers

    hi!
    you can navigate a program by using tabbers. but when i don't want tabbers, but my own controls, how do i do this?
    do i have to use a panel for each "tab" and hide/show it when toggling?
    any ideas would be appreciated.
    thanx

  2. #2
    Registered User valaris's Avatar
    Join Date
    Jun 2008
    Location
    RING 0
    Posts
    507
    This is probably the best approach. Recently I had to do something like this where I wanted a tabbing system in a toolbar. Placing each "screen's" controls in a panel works great, although you can use any of the other control containers as well.

  3. #3
    Registered User
    Join Date
    Jan 2008
    Posts
    244
    yes sure, but how do i switch these panels within the form editor? how do i position them?

  4. #4
    Registered User valaris's Avatar
    Join Date
    Jun 2008
    Location
    RING 0
    Posts
    507
    I found it was easiest to make each of the panels content a user control for designer support.

  5. #5
    Registered User
    Join Date
    Jan 2008
    Posts
    244
    you mean like a custom control that works like a tabber, with invisible tabs and it can be accessed by code?
    are there any controls for that?

  6. #6
    Registered User
    Join Date
    Mar 2009
    Location
    england
    Posts
    209
    I inherit a ToolStrip as the basis of my custom TabControl, and then as already mentioned in this thread, use a UserControl as the TabPage. Then it's just a case of adding a few helpers into the custom tab control such as Pages.Add, Pages.Remove, and so on.

    I try to avoid using the regular TabControl as it seems to flicker way too much, it lacks any decent paint override events, there's no double-buffering property to help reduce flicker... it's just generally speaking very nasty.

  7. #7
    Registered User valaris's Avatar
    Join Date
    Jun 2008
    Location
    RING 0
    Posts
    507
    I just used a toolbar as the basis for showing the tabs since they offer some cool built in rollovers and visual appeal. From there I wrote a manager as theoobe suggested that allows you to add/remove pages, and also check to see if a page is already open if a user requests a new instance of it and sets it to active. From there each tab once clicked could display my custom user control (which has whatever content I want on it).

    I could post it if needed.

  8. #8
    Registered User
    Join Date
    Jan 2008
    Posts
    244
    umh. i never wrote good custom controls before... are there any available for free?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Navigating a character string array from pointers
    By Boxknife in forum C Programming
    Replies: 3
    Last Post: 04-16-2009, 01:32 PM
  2. Navigating a maze recursively
    By JOsephPataki in forum C Programming
    Replies: 4
    Last Post: 06-06-2003, 01:36 AM
  3. array navigating problem
    By kendals in forum C Programming
    Replies: 3
    Last Post: 03-21-2002, 06:32 PM
  4. navigating in a linked list
    By kendals in forum C Programming
    Replies: 11
    Last Post: 02-23-2002, 07:36 PM