Using the VS.NET form designer with tab controls

This is a discussion on Using the VS.NET form designer with tab controls within the Windows Programming forums, part of the Platform Specific Boards category; I'm having difficulties using the VS.NET form designer and tab controls. The main problem is that there are controls on ...

  1. #1
    mustang benny bennyandthejets's Avatar
    Join Date
    Jul 2002
    Posts
    1,401

    Using the VS.NET form designer with tab controls

    I'm having difficulties using the VS.NET form designer and tab controls. The main problem is that there are controls on top of each other, which makes it very difficult to move/size them. Also, I am unsure of the best way to have multiple tabs. I thought about handling the tab changes and just changing the visibility of individual controls, but that seems really inefficient.

    Questions:
    1. What is the best way to go about implementing a tab control system?

    Thanks.
    benforbes@optusnet.com.au
    Microsoft Visual Studio .NET 2003 Enterprise Architect
    Windows XP Pro

    Code Tags
    Programming FAQ
    Tutorials

  2. #2
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,855
    >>there are controls on top of each other, which makes it very difficult to move/size them

    Yes. Depends on the number of controls.
    TAB control does not have to have any client area, apart from the TAB 'buttons' themselves. This may help make it easier to work with the controls 'under' the TAB.

    >>1. What is the best way to go about implementing a tab control system?

    Property pages may be what you are looking for, derived from CDialog in MFC.
    "Objects of class CPropertyPage represent individual pages of a property sheet, otherwise known as a tab dialog box." MSDN MFC

    Another way is to create a dialog for each TAB page in the designer. When the TAB is called create all the dialogs. Show the correct one, hide the old one, when the user changes the TAB. Handle the move, and stop size, messages for both ie hook the dialogs move into the TAB (or its parents).
    "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
    Friedrich Nietzsche

    "I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
    George Best

    "If you are going through hell....keep going."
    Winston Churchill

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. is there a c form designer out there by any chance
    By *DEAD* in forum C Programming
    Replies: 2
    Last Post: 12-16-2007, 07:48 PM
  2. placing user controls in a form...
    By AngKar in forum C# Programming
    Replies: 2
    Last Post: 07-21-2006, 04:02 PM
  3. Tab Ordering of GUI Controls
    By cloudy in forum Windows Programming
    Replies: 2
    Last Post: 04-22-2006, 09:13 AM
  4. Accessing Controls on a different form from one form.
    By Tperry23 in forum C# Programming
    Replies: 7
    Last Post: 06-09-2005, 06:13 PM
  5. Tab controls - MFC (revived)
    By Robert602 in forum Windows Programming
    Replies: 1
    Last Post: 01-22-2002, 11:32 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21