'X' on a tab control? |
Post Reply |
Author | |
ContactGT
Newbie Joined: 30 October 2006 Status: Offline Points: 28 |
Post Options
Thanks(0)
Posted: 30 October 2006 at 11:27am |
Is is possible to add a little 'X' button on the right hand side of a CXTPTabControl, so that the user can close the current tab? I would like this button to generate an OnClose message, which I already handly (through a right click).
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hello, try
tc.FindNavigateButton(xtpTabNavigateButtonClose)->SetFlags(xtpTabNavigateButtonAlways);
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
ContactGT
Newbie Joined: 30 October 2006 Status: Offline Points: 28 |
Post Options
Thanks(0)
|
Excellent thank you. What event do I need to capture to handle pressing of this button? It is not hitting OnClose() |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hello,
Unfortunatelly no notification, but virtual method exists:
override OnNavigateButtonClick. Default implementation is:
void CXTPTabControl::OnNavigateButtonClick(UINT nID)
{ if (m_pSelected && (nID == xtpTabNavigateButtonClose) && m_pSelected->IsClosable()) { DeleteItem(m_pSelected->GetIndex()); } } |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
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 |