![]() |
activating tabs in CXTPTabControl |
Post Reply ![]() |
Author | |
nadia ![]() Newbie ![]() Joined: 15 February 2007 Location: United States Status: Offline Points: 1 |
![]() ![]() ![]() ![]() ![]() Posted: 15 February 2007 at 3:46pm |
I have a dialog attached to an XTPDockingPane. On the dialog I have several custom buttons (derived from MFC CButton) and a CXTPTabControl with corresponding dialog views (one for each button). Each view in the tab control has a number of edit controls. Clicking each custom button brings a particular tab to view. The tabs can also be selected/clicked directly from the tab control for editing. The problem is as follows: If I select any tab directly, it brings up the particular view and the cursor is placed in the first edit box on the view. However, if I click the custom button, the particular tab is selected and brought to view OK, but it does not place the cursor to the edit box (unless I click the tab directly). There is OnClicked() message handler in my custom button class that posts a message to the parent dialog to select specified tab (TabControl->SetCurSel(index);) I also tried to call TabControl->SetFocus(); TabControl->SetSelectedItem(pItem); TabControl->OnItemClick(pItem); even pItem->Select() and pItem-> SetVisible(); but nothing seems to programmatically set the focus to the correct spot (unless I manually click the tab)... This worked OK when I used MFC CTabCtrl class which makes me believe there is something up with CXTPTabControl… Any suggestions? |
|
-------------
-Nadia- |
|
![]() |
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 |