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

  • IBM Worklight is a mobile application development platform that lets you extend your business to mobile devices. It is designed to provide an open, comprehensive platform to build, run and manage HTML5, hybrid and native mobile apps.

  • Companies must routinely transfer files and share data to run their business, work with partners, and speed operations. However, many find the traditional approach to file transfer lacks necessary security, is too complex and difficult to manage, does not support the levels of automation needed, and breaks down when addressing the file transfer requirements of new areas like Big Data analytics and mobile applications. This QuinStreet SmartSelect discusses how the changing business environment is making the use …

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds