Print Page | Close Window

Regarding Tab View

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Controls
Forum Description: Topics Related to Codejock Controls
URL: http://forum.codejock.com/forum_posts.asp?TID=18429
Printed Date: 24 November 2024 at 8:20am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Regarding Tab View
Posted By: KumarCJ
Subject: Regarding Tab View
Date 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





Replies:
Posted By: Oleg
Date Posted: 27 May 2011 at 3:39am
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


Posted By: KumarCJ
Date Posted: 31 May 2011 at 10:55am
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



Posted By: KumarCJ
Date Posted: 01 June 2011 at 7:14am
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  


Posted By: KumarCJ
Date Posted: 03 June 2011 at 12:43am
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


Posted By: Oleg
Date Posted: 03 June 2011 at 4:57am
Hello,

Sorry, I mean this sample Samples\ToolkitPro\TabbedView   that use our CXTPTabControl - not CXTPTabView


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: KumarCJ
Date Posted: 03 June 2011 at 6:50am
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 - 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 - 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


Posted By: Oleg
Date Posted: 03 June 2011 at 8:41am
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


Posted By: KumarCJ
Date Posted: 06 June 2011 at 2:15am
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 !


Posted By: Oleg
Date Posted: 06 June 2011 at 7:14am
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


Posted By: KumarCJ
Date Posted: 07 June 2011 at 2:48am
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?


Posted By: Oleg
Date Posted: 07 June 2011 at 3:12am
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


Posted By: Oleg
Date Posted: 07 June 2011 at 3:31am

Here sample update that add excel like navigate buttons for Samples\ToolkitPro\TabbedView  sample

uploads/37/TabbedViewView.zip - uploads/37/TabbedViewView.zip







-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: KumarCJ
Date Posted: 07 June 2011 at 6:02am
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 - uploads/2903/Excel_type_tab_Scrolling_option.zip

Best Regards,
Saket Kumar


Posted By: Oleg
Date Posted: 08 June 2011 at 5:40am
Hi,

You can use GetHeaderOffset()/SetHeaderOffset to manually get and set it.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: KumarCJ
Date Posted: 08 June 2011 at 6:40am
Ok, Thank You !



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net