Subject |
Author |
Date |
|
Carsten Pedersen
|
Sep 2, 2011 - 4:58 AM
|
Hi,
I have an application using a custom CDlgtab inherited from CExtTabPageContainerWnd. When I fill it with tabs, I don’t get the prev/next arrows when the number of tabs exceed the visible amount of tabs the containerwnd can show. What do we need to do to enable the prev/next arrows?
Thanks in advance,
Carsten
|
|
Carsten Pedersen
|
Sep 14, 2011 - 6:45 AM
|
By the way - the m_wndTab.ShowBtnTabListSet(true); doesn’t show the list button. The arrow buttons are there. Any suggestions?
|
|
Technical Support
|
Sep 14, 2011 - 12:50 PM
|
Please take a look at the Tab Settings dialog page inside Resizable Bar 0 in the TabPages sample application. You can check the Show Tab List check box and tab list button will appear. The following method handles check box event:
void CTabManageDlg::OnCheckShowTabList()
{
CExtTabPageContainerWnd* pTabPageContainer = ((CExtTabPageContainerWnd*)GetParent()->GetParent());
pTabPageContainer->ShowBtnTabListSet( m_CheckShowTabList.GetCheck()==1 );
}
|
|
Carsten Pedersen
|
Sep 8, 2011 - 5:44 AM
|
I have tried the following styles to my tab window: m_wndTab.ModifyStyleEx(0,WS_EX_CONTROLPARENT,0); m_wndTab.ModifyStyle(0,WS_CLIPCHILDREN|WS_CLIPSIBLINGS,0); m_wndTab.EqualWidthsSet(false); m_wndTab.AutoHideScrollSet(false); m_wndTab.ShowBtnTabListSet(true); m_wndTab.ShowBtnScrollHomeSet(true); m_wndTab.ShowBtnScrollEndSet(true);
Nothing comes up, unfortunately. I have checked with the sample code provided.
|
|
Technical Support
|
Sep 12, 2011 - 2:53 AM
|
The tab page container control displayed on the Tab Containers dialog page in the ProfUIS_Conrols sample application demonstrates visible scrolling buttons. We need to take a look at the entire tab page container initialization code, or, even better, you can send us a test project demonstrating how you initialize it.
|
|
Carsten Pedersen
|
Sep 14, 2011 - 6:43 AM
|
Hi again,
We located the problem to the class we inherited from CExtTabPageContainerWnd. We are overriding the following callbacks: void CTabPageContainerWnd::CTabWnd::OnTabWndUpdateItemMeasure() void CTabPageContainerWnd::CTabWnd::OnTabWndDrawItem()
to be able to modify font on the tab. In the overridden methods we increase the tab size as well as the font. If I just use the normal CExtTabPageContainerWnd class, then we get the buttons as in the sample program.
So therefore my question is: How do we properly change tab fonts without removing the buttons on the right edge?
Another question - Are stacked tabs not supported? As on propertysheets: CPropertySheet::EnableStackedTabs
Best regards,
Carsten
|
|
Technical Support
|
Sep 14, 2011 - 12:49 PM
|
Please override the CExtTabWnd::OnQueryFont() virtual method in your CExtTabWnd -derived class. Then make the tab page container using your custom tab window by overriding the following virtual method:
virtual CExtTabWnd* OnTabWndGetTabImpl()
{
return new CExtTWPC < CYourTabWnd >;
}
The stacked tabs are not supported because they are obsolete according to the latest Microsoft UI Guidelines: If you have more than 8 tabs, use vertical list box tabs.
|
|
Carsten Pedersen
|
Sep 15, 2011 - 1:07 AM
|
Are vertical list box tabs the sames as tabs oriented as left or right? Or do you have a sample showing the functionality?
|
|
Technical Support
|
Sep 15, 2011 - 2:51 AM
|
Please take a look at the main dialog in the ProfUIS_Controls sample app.
|
|
Carsten Pedersen
|
Sep 15, 2011 - 2:41 PM
|
Thank you, it worked when the OnQueryFont was overridden. Thank you very much.
One last thing; How do you disable scrolling for the first two pages (for example) in a tab container. So that they are always visible even though you scroll the remaining? I’m almost positive that I had it working at a time, but now I can’t find the methods to invoke this behavior with.
Best regads,
Carsten
|
|
Technical Support
|
Sep 17, 2011 - 5:58 AM
|
Sticky tabs are not supported. We can regard this as a feature request.
|
|
Technical Support
|
Sep 7, 2011 - 2:29 AM
|
The CExtTabPageContainerWnd::ShowBtn***() should be in the help. This is probably some help file compilation issue. Thank you for reporting it. The tab item scrolling buttons can become hidden if you applied some other style incompatible with them. The __ETWS_EQUAL_WIDTHS and CExtTabPageContainerWnd::EqualWidthsGet() method force hide tab scrolling arrow buttons. This is demonstrated on the Tab Containers dialog page in the ProfUIS_Controls sample application.
|
|
Carsten Pedersen
|
Sep 5, 2011 - 3:21 PM
|
I should say - I’m using the aqua theme
|
|
Carsten Pedersen
|
Sep 5, 2011 - 2:59 PM
|
No wonder I couldn’t find this in the help - it’s undocumented. However, it does unfortunately not work. I set these in the :OnInitDialog procedure of the parent dialog and nothing happens. Any other things that should be invoked or?
|
|
Technical Support
|
Sep 5, 2011 - 12:26 PM
|
To enable tab item scrolling buttons, the CExtTabPageContainerWnd::ShowBtnScrollHomeSet() and CExtTabPageContainerWnd::ShowBtnScrollEndSet() methods should be invoked .
|