A little problem with CXTFlatTabCtrl |
Post Reply |
Author | ||
Karnize
Newbie Joined: 20 October 2003 Location: Italy Status: Offline Points: 19 |
Post Options
Thanks(0)
Posted: 05 November 2003 at 3:37am |
|
Hello, I have a little problem with CXTFlatTabCtrl. After I create a tab control and add some pages to it I need non zero page to be currently selected. But if I do so, this non zero page displayed as the first page (i.e. in the left corner of the control) and all pages before this one will be behind the left side. It not depends on the actual size of the tab control. In my case I have wide enough tab control and only two pages in it, so I decide to hide scroll arrows. So if now I select as current the second page in tab control after it creating, I have not access to the first tab because it located behind the control border. Also sometimes all tabs located behind the border. I look to the code and found the place where the problem located. In SetCurSel function you have the next code:
so if I select the second page the 'else' branch will be executed and GetTotalTabAreaWidth() returns the negative value, because the m_xGripperPos member is negative (because 'const int sbExtreme = (m_nClientWidth - 4 * m_cx - m_cy);' in SetGripperPosition function give the negative value while m_nClientWidth is zero). So m_nOffset became very big. It is not so easy for me to understand how you draw tabs so I temporary solve the problem like here:
but I didn`t sure what it is a correct solution. |
||
xtreme
Newbie Joined: 13 January 2004 Status: Offline Points: 1 |
Post Options
Thanks(0)
|
|
Dear Sir, I'm just a begineer of this tool kit & looking for some sample on How to use CXTFlatTabCtrl on MDI application in vc++ , Could you please suggest me some example on the above subject or send some source code sample. Thanks & Regards Xtreme
|
||
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 |