CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Aug 2000
    Posts
    48

    Smile How to to resize two TabControls?

    I have two TabControls on a single C# Form. One TabControl on above the other one like so...

    TabControl1
    Resizer
    TabControl2

    Between both TabControls, I want to give the user the ability to resize both controls by moving a single bar. The window should stay the same size.

    Do I use a resize window? Or a Splitter? Or something else? Any code examples would also be appreciated.

    Thanks!
    - Adrian

  2. #2
    Join Date
    Nov 2002
    Location
    Singapore
    Posts
    1,890
    hi
    I have attached the ZIP file as a sample may be you like the idea !!!

    comments welcome. and i think splitter is a way to do ..






    -Paresh
    Attached Files Attached Files

  3. #3
    Join Date
    Aug 2000
    Posts
    48

    Talking

    Hi Paresh,

    That's great! How did you get the splitter to not stick to the right, left, top, or bottom?

    When I add a Splitter control, it only wants to stick to one side of the window. I can't get it to stay in the middle. Any suggestions?

    (And thank you very much for the example!)

    - Adrian

  4. #4
    Join Date
    Nov 2002
    Location
    Singapore
    Posts
    1,890
    no there are adding sequences...
    you have to add tabcontrol first, dock it to left, add splitter (which will automatically dock it to left) and FYI add the another tabcontrol docking fill.
    by docking i mean that Dock property to
    DockStyle.Fill or Left etc..

    Paresh

  5. #5
    Join Date
    Aug 2000
    Posts
    48
    Dear Paresh,

    You are correct! The adding sequence did effect the priority of the layout! This time it worked great!

    You are a genius! Thank your for all your help!

    Best wishes,
    - Adrian

  6. #6
    Join Date
    Nov 2002
    Location
    Singapore
    Posts
    1,890
    never mind. i am glad u got it working...



    Paresh

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured