Results 1 to 9 of 9

Thread: Tab control Problem

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2003
    Posts
    263

    Tab control Problem

    Hi

    Im using visual basic.net, and i have a tabcontrol. But when i make certain tabpages property to inivisble they are still there. This property is on;y available in code!

    Is there any reason for this or is there something im doing wrong?

    Cheers All

    Danny

  2. #2
    New Member
    Join Date
    Feb 2003
    Location
    Maputo, Moçambique
    Posts
    13
    I've had problems with the visible property for tab pages too. Setting visible to false makes all the controls on the tab page invisible, but not the tab page itself. One alternative can be to remove the tabe page instead, and then add it when you want it back.

    VB Code:
    1. ' Remove tab page
    2. Me.tabControl.Controls.Remove(Me.TabPage1)
    3.  
    4. ' Add tab page
    5. Me.tabControl.Controls.Add(Me.TabPage1)

    I also have another question about tab controls. How can I set the back color of the tab control? Doing this for the tab pages is no problem, but the tab control itself remains grey.

    /Sara

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2003
    Posts
    263
    Hi Sara

    We found the same solution and have been using it for a while now, but it seems that a new form we are developing has nearly 17 tabs and they need to be in order, so were kinda hoping to find a solution to the problem.

    From what i have done with tabs we haven't needed to change the colour, but i know what you mean it looks awful as a gray background. One form we gave up on that and used the toggle or flat buttons looks much better.

    Cheers, nice to know im not alone on this one

    Danny

  4. #4
    Member EagleEye's Avatar
    Join Date
    May 2002
    Location
    South Carolina, USA
    Posts
    43
    May I suggest using Magic Library.

    It has a much better tabpage control (even allows color tabs). I use it whenever I need any tab control now.

    devCity
    .NET Magic Library (Recommended!)
    The Magic Library contains great user interface controls for .NET applications. It includes docking windows, menus and tab control just like those in Visual Studio .NET/OfficeXP. It comes with all the source code and samples written in C# and VB.NET. And it's FREE!
    Download @ DotNetMagic
    Eagle Eye

    "Programming is easy ... when you are done."

  5. #5
    yay gay PT Exorcist's Avatar
    Join Date
    Apr 2002
    Location
    . . . my reason of shame
    Posts
    2,729
    that is all a lot lot lot cool until u try to do that things with the windows and this and then and u realise there are hundreds of classes and u dont know how that works..it is a lot complex..could've been a lot more simple...
    \m/\m/

  6. #6
    Addicted Member Zealot's Avatar
    Join Date
    Jul 2002
    Location
    Lisboa, Portugal
    Posts
    206
    Hey Sara and Danny how about putting your tab controls inside a panel, and then turn the panel invisible? Isn't that a lot simpler?

  7. #7

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2003
    Posts
    263
    Zealot

    That would still leave the actual tab at the top of the control, making all the controls invisible of the whole tabcontrol invisible will not be the same. Each tabpage has a visible property but setting it doesn't have any effect!

    Regards

    Danny

  8. #8
    Addicted Member
    Join Date
    Mar 2001
    Location
    The Netherlands
    Posts
    184

    Re: Tab control Problem

    But it costs 399,- that is a bit much if i just need another Tab control...

    I have been searching for ages now for a tabcontrol that supports re-ordering of the tabs through the mouse though...

    Petty it is that expensive (i only need the tab control and not the entire kit)

  9. #9

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2003
    Posts
    263

    Re: Tab control Problem

    Hi All

    I finally bit the bullet on it and wrote my own control. It uses an Array to hold the tab order so not to lose it! and uses the .Tag property to determine whether to add or remove them. Solved the problem and was free.

    cheers Danny

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