Regarding Tab View |
Post Reply |
Author | |
KumarCJ
Groupie Joined: 02 April 2007 Location: India Status: Offline Points: 96 |
Post Options
Thanks(0)
Posted: 24 May 2011 at 1:44am |
Hi,
Our requirement is to have tab control at the bottom of view and each tab contains icon + text. In "ExcelTabView" the tab cotrol are displayed at the bottom but I do not found any icon added to tabs. 1. Can we add icon to tabs in "ExcelTabView" sample program. ? 2. In "TabbedView" sample program the Tabs are placed at the top, can we place the Tab at the bottom? Thanks, Saket |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
Yes, start from TabbedView sample and add such code m_wndTabControl.GetPaintManager()->SetPosition(xtpTabPositionBottom); m_wndTabControl.SetAppearance(xtpTabAppearanceExcel); |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
KumarCJ
Groupie Joined: 02 April 2007 Location: India Status: Offline Points: 96 |
Post Options
Thanks(0)
|
Hi Oleg, Started with "\Samples\Controls\TabbedView" project # To Display Tabs at the bootm : Works ok -- For the code "m_wndTabControl.GetPaintManager()->SetPosition(xtpTabPositionBottom);" -- Used "CXTPTabExBase::ModifyTabStyle(...)" to display the Tabs at the bottom.
# To Set tabs like excel type: Not able to set Excel type Tab for "TabbedView" sample program -- For the code "m_wndTabControl.SetAppearance(xtpTabAppearanceExcel);" -- how I can get the "m_wndTabControl"?? -- Since In "TabbedView" sample program the class derivation is like below -- class CTabbedViewView : public CXTPTabView -- Adding the Tab with the help of "AddControl(...)" -- "CXTPTabView::GetTabCtrl()" returns "CTabCtrl" -- How I can get the "CXTPTabManager/m_wndTabControl"???? So that We can use "SetAppearance(...)" to set tab like Excel type.????? Thanks, Saket |
|
KumarCJ
Groupie Joined: 02 April 2007 Location: India Status: Offline Points: 96 |
Post Options
Thanks(0)
|
Hi Oleg,
Please refer 2ND QUESTION 1ST QUESTION/Answer: ----------------------------- # To Display Tabs at the bottom -- Got the suggested code from oleg i.e. "m_wndTabControl.GetPaintManager()->SetPosition(xtpTabPositionBottom);" -- Since we are unable to get "m_wndTabControl" in TabbedView Sample program -- I used "CXTPTabExBase::ModifyTabStyle(...)" and it works us and able to place tab at the bottom -- Works fine 2ND QUESTION: -------------------- # To display tabs like Excel type: -- Got the suggested code from oleg i.e. "m_wndTabControl.SetAppearance(xtpTabAppearanceExcel);" -- In the "Xtreme ToolkitPro v15.0.2\Samples\Controls\TabbedView" sample program. -- Class derivation is like -- "class CTabbedViewView : public CXTPTabView" -- "AddControl(...)" is used to add tabs with respective views -- how I can get the "m_wndTabControl"?? -- "CXTPTabView::GetTabCtrl()" returns "CTabCtrl" which do not have "SetAppearance(...)" -- "SetAppearance(...)" is member function of "CXTPTabManager and "CXTPTabPaintManager" -- AddControl(...) and "GetTabCtrl()" does not return Tab control -- So How I can get the "CXTPTabManager/m_wndTabControl"???? So that We can use "SetAppearance(...)" to set tab like Excel type.????? in "TabbedView" sample program Please reply as soon as possible, so that we can start implementation. Thanks in advance, Saket |
|
KumarCJ
Groupie Joined: 02 April 2007 Location: India Status: Offline Points: 96 |
Post Options
Thanks(0)
|
Waiting for reply from Codejock, please clarify the query as soon as possible !
Its urgent to understand whether we can achieve above mentioned 2nd question or not ?? -- Saket |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hello,
Sorry, I mean this sample Samples\ToolkitPro\TabbedView that use our CXTPTabControl - not CXTPTabView
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
KumarCJ
Groupie Joined: 02 April 2007 Location: India Status: Offline Points: 96 |
Post Options
Thanks(0)
|
Hello,
Samples\ToolkitPro\TabbedView sample program uses "CXTPTabView" class and function AddControl(...)" to add the Tabs. With reference of Posted: 27 May 2011; i.e as mentioned below -- Yes, start from TabbedView sample and add such code -- m_wndTabControl.GetPaintManager()->SetPosition(xtpTabPositionBottom); -- m_wndTabControl.SetAppearance(xtpTabAppearanceExcel); I started R&D with "TabbedView" sample which used "CXTPTabView" and tried to add code as suggested code on post 27 May 2011 for the same topic. I modified the sample program "TabbedView" to make use of "SetPosition(...) / SetAppearance(...)" I am attaching the modified code base for "TabbedView" sample program uploads/2903/TabbedViewSK.zip -- Please refer "int CTabbedViewView::OnCreate(...) " function for tab creation and displaying Tab at bottom Please find the screenshot with QUESTION uploads/2903/Tab-Question.zip -- We are giving option to user to display the tabs as "Normal Tab with Icon" OR "Excel type Tab " -- So my question is should I need to uses 2 different way to have 2 different Tab types? i.e. For EXCEL type tab view : Way used in "ExcelTabView" sample program For Normal Tab view: Way used in "TabbedView" sample program OR -- Can we take a single approach for Creating and Displaying Tab( i.e. the approach taken in "TabbedView" sample program) and by using some Class / Function / Code [i.e. SetAppearance(..) ] we can display Tabs from "Normal Type" to "EXCEL type" in the same sample program??? -- Saket |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Still it seems you use wrong sample.
Samples\ToolkitPro\TabbedView - use CXTPTabControl that is recommended to use. your sample is based on Samples\Controls\TabbedView
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
KumarCJ
Groupie Joined: 02 April 2007 Location: India Status: Offline Points: 96 |
Post Options
Thanks(0)
|
I reviewed the sample you mention i.e. Samples\ToolkitPro\TabbedView which uses "CXTPTabControl " class
One small query is that -- when we set appearance of tabs as Excel type using "m_wndTabControl.GetPaintManager()->SetAppearance(xtpTabAppearanceExcel);" -- I tried using "FTS_XTP_HASHOMEEND and FTS_XTP_HASARROWS" tab style during the creation of tab, see the code below m_wndTabControl.Create(WS_CHILD|WS_VISIBLE|WS_CLIPCHILDREN|WS_CLIPSIBLINGS|FTS_XTP_HASHOMEEND|FTS_XTP_HASARROWS, CRect(0, 0, 0, 0), this, IDC_TABCONTROL); How we can get "First/Last/Next/Previous" navigation button for excel type tab in Samples\ToolkitPro\TabbedView sample program ? [Note:] I added more number Tabs, we can see "Scroll Right" and "Scroll Left" button at the right side. If I click on "Scroll Right", it scroll to 1 tab right, But if I pressed "Scroll Right" continuously it scroll till end of right tab. Is there any ways through which we can get "First/Last/Next/Previous" navigation button at the left side ? Thanks in advance ! |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
Sorry, FTS_XTP_HASHOMEEND|FTS_XTP_HASARROWS are not supported by CXTPTabControl and you can only show buttons on right by default.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
KumarCJ
Groupie Joined: 02 April 2007 Location: India Status: Offline Points: 96 |
Post Options
Thanks(0)
|
Ok, thank you very much !
So if we need all four navigation(Home/Previous/Next/End) buttons we need to use the ways given in "\Samples\Controls\ExcelTabView" . Am I Right? |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Yes, right, only CXTPExcelTabCtrl doesn't support icons in tabs like CXTPTabControl.
Checking how we can extend CXTPTabControl to show these buttons before tabs.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Here sample update that add excel like navigate buttons for Samples\ToolkitPro\TabbedView sample |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
KumarCJ
Groupie Joined: 02 April 2007 Location: India Status: Offline Points: 96 |
Post Options
Thanks(0)
|
Thank you very much Oleg !
Help and efforts are appreciated ! I would like to suggest one more thing for this. -- If possible, if we should have some kind of scrolling flag which will be accessible by “CXTPTabControl m_wndTabControl;”, so that user (programmer) can control the scrolling option directly after crating the tab control. please find attached screenshot"Excel type tab Scrolling option.zip" for scrolling options ! uploads/2903/Excel_type_tab_Scrolling_option.zip Best Regards, Saket Kumar |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
You can use GetHeaderOffset()/SetHeaderOffset to manually get and set it.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
KumarCJ
Groupie Joined: 02 April 2007 Location: India Status: Offline Points: 96 |
Post Options
Thanks(0)
|
Ok, Thank You !
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |