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

  • According to a 2014 Javelin Strategy & Research Study, there is a new victim of fraud every two seconds – and that's just in the U.S. With identity theft and consumer fraud rising, and more frequent and sizable data breaches in the news, financial institutions need to work harder than ever to protect their customers and their business. Download this white paper to learn how you can use multi-channel communications to minimize the costs of fraud while also increasing customer loyalty.

  • Today, users, applications, and data exist in more places than ever before, creating an unprecedented challenge for IT. How can IT achieve the flexibility and agility it needs to offer multiple types of applications in multiple locations? To better serve business demands for information everywhere, enterprises must develop new strategies for optimizing multiple kinds of networks. Read this white paper to learn how hybrid networks provide an unprecedented level of network dynamism, enterprise agility, and the …

Most Popular Programming Stories

More for Developers

RSS Feeds

Thanks for your registration, follow us on our social networks to keep up-to-date