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

  • Live Event Date: August 20, 2014 @ 1:00 p.m. ET / 10:00 a.m. PT When you look at natural user interfaces as a developer, it isn't just fun and games. There are some very serious, real-world usage models of how things can help make the world a better place – things like Intel® RealSense™ technology. Check out this upcoming eSeminar and join the panel of experts, both from inside and outside of Intel, as they discuss how natural user interfaces will likely be getting adopted in a wide variety …

  • Mobile is introducing sweeping changes throughout your workplace. As a senior stakeholder driving mobile initiatives in your organization, you may be lost in a sea of technologies and claims from vendors promising rapid delivery of applications to your employees, customers, and partners. To help explain some of the topics you will need to be aware of, and to separate the must-haves from the nice-to-haves, this reference guide can help you with applying a mobile strategy in the context of application …

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds