Display only One Row of Tabs

If you have many property pages then the property sheet ends up showing multiple rows of tabs. Sometimes, the addition space required for the tabs is unacceptable. We can force the property sheet to use a single row of tabs by calling the CPropertySheet:: EnableStackedTabs(FALSE) before calling the DoModal() function.
	Propsheet.EnableStackedTabs(FALSE);

Alternatively, the call to EnableStackedTabs() can be placed in the overridden version of OnCreate() in the CPropertySheet derived class. This call should precede the call to the base class version of OnCreate().



Comments

  • Text from MSDN, it states clearly

    Posted by Legacy on 07/18/2002 12:00am

    Originally posted by: Harret

    Remarks
    
    

    Call this member function to indicate whether to stack rows of tabs in a property sheet. By default, if a property sheet has more tabs than will fit in a single row in the width of the property sheet, the tabs will stack in multiple rows. To use scrolling tabs instead of stacking tabs, call EnableStackedTabs with bStacked set to FALSE before calling DoModal or Create.

    Reply
  • Doing Both ways doesn't help me out !!!

    Posted by Legacy on 09/14/2001 12:00am

    Originally posted by: Deepak

    hi,
    i've already tried applying these two methods, but failed.
    Also when my tabs area gets wider than than property sheet area, the tabs doesn't adjust in two rows, rather the extra tabs goes out of sight.
    I've created some pages at runtime. The application is a Dialog Based App. In which, modeless property sheet is a child of main dlg box. It is created as below...
    //
    propSheet = (CPropSheet*)new CPropSheet("PS",this,0);
    propSheet->Create(this,WS_CHILD|DS_CONTROL);
    //
    If anyone could please help me out..., that'll be really nice.
    Thankyou.

    Reply
  • make page flat

    Posted by Legacy on 04/12/2001 12:00am

    Originally posted by: jimaaa

    I want to make propertypage flat,not 3D look,How can I?

    Reply
  • How can I Display only One Row of Tabs only using APIs

    Posted by Legacy on 08/14/2000 12:00am

    Originally posted by: beginner

    I've been bothered with this problem for some time, who can help me?

    Reply
  • Additional Space Not Utilized

    Posted by Legacy on 06/18/1999 12:00am

    Originally posted by: Steve Miller

    VC++ 5 doesn't make use of the additional space made available by using a single tab row. I found that the
    problem occurs because the style of the tab control is changed after the sheet resizes the screen elements
    (see DLGPROP.CPP). This problem can be corrected by overriding the OnInitDialog() function like so:
    
    

    BOOL CMyPropSheet::OnInitDialog()
    {
    if (!m_bStacked)
    {
    HWND hWnd = (HWND)::GetDlgItem(m_hWnd, AFX_IDC_TAB_CONTROL);
    ASSERT(hWnd != NULL);
    CWnd::ModifyStyle(hWnd, TCS_MULTILINE, TCS_SINGLELINE, 0);
    }

    return CPropertySheet::OnInitDialog();
    }

    Reply
  • Display one row of tabs but there is line spacing

    Posted by Legacy on 04/26/1999 12:00am

    Originally posted by: Goh Choon Lye

    I have tried to display only one row of the tabs for
    CPropertySheet by including the
    m_PropertySheet.EnableStackedTabs(FALSE);
    //m_PropertySheet is object of CPropertySheet
    in the OnInitUpdate of my CFormView. It's working
    but there is "line spacing" in the CPropertyPage
    before displaying my other controls. When I select
    other CPropertyPage and select back the previous
    CPropertyPage, the "line spacing" is missing.
    I need the help to get rid the "line spacing" when
    that CPropertyPage is shown first time.
    Thank you first for advice.

    Reply
Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • On-demand Event Event Date: December 18, 2014 The Internet of Things (IoT) incorporates physical devices into business processes using predictive analytics. While it relies heavily on existing Internet technologies, it differs by including physical devices, specialized protocols, physical analytics, and a unique partner network. To capture the real business value of IoT, the industry must move beyond customized projects to general patterns and platforms. Check out this webcast and join industry experts as …

  • Today's agile organizations pose operations teams with a tremendous challenge: to deploy new releases to production immediately after development and testing is completed. To ensure that applications are deployed successfully, an automatic and transparent process is required. We refer to this process as Zero Touch Deployment™. This white paper reviews two approaches to Zero Touch Deployment--a script-based solution and a release automation platform. The article discusses how each can solve the key …

Most Popular Programming Stories

More for Developers

RSS Feeds