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: September 10, 2014 Modern mobile applications connect systems-of-engagement (mobile apps) with systems-of-record (traditional IT) to deliver new and innovative business value. But the lifecycle for development of mobile apps is also new and different. Emerging trends in mobile development call for faster delivery of incremental features, coupled with feedback from the users of the app "in the wild." This loop of continuous delivery and continuous feedback is how the best mobile …

  • Java developers know that testing code changes can be a huge pain, and waiting for an application to redeploy after a code fix can take an eternity. Wouldn't it be great if you could see your code changes immediately, fine-tune, debug, explore and deploy code without waiting for ages? In this white paper, find out how that's possible with a Java plugin that drastically changes the way you develop, test and run Java applications. Discover the advantages of this plugin, and the changes you can expect to see …

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds