CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Guest

    CPropertySheet and Hiding Tabs

    There is plenty of code around to disable a tab but can they be hidden/unhidden on the fly?

    Regards

    Malc


  2. #2
    Join Date
    Jul 1999
    Location
    Romania - Iasi
    Posts
    558

    Re: CPropertySheet and Hiding Tabs

    You must your class derived from CPropertySheet and you must a variable like this:


    CPropertyPage *m_pages[n]//where n is number of pages




    And when you want to hide a page do it something like this:

    myPSheet.RemovePage( number of page to remove)//0 indexed



    If you want to unhide a page, if isn't the last page do this:
    [ccode]
    //Remove all pages

    for(int i = 0; i<myPSheet.GetPageCount;i++)
    {
    myPSheet.RemovePage(i);
    }

    for(int i = 0; i<n/*n - no of pages*/;i++)
    {
    myPSheet.AddPage(m_pages[i]);
    }



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