![]() |
Detect RibbonTab selection by user |
Post Reply ![]() |
Author | |
Alex ![]() Groupie ![]() ![]() Joined: 12 May 2004 Status: Offline Points: 54 |
![]() ![]() ![]() ![]() ![]() Posted: 16 November 2009 at 9:15am |
Hello, how can I detect that the user selected a ribbon tab ?
I want to detect a real user interaction initiated with the mouse or keyboard ( does it work with the keyboard ? )
Just detecting the TCN_SELCHANGED or TCN_SELCHANGING is not sufficient.
Thanks in advance.
Alex
|
|
www.ANKHOR.com
Product: Xtreme ToolkitPro version 15.2.1 Platform: Windows 7 Ultimate (64bit) Language: Visual C++ 2005 / 2008 / 2010 |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi, Please check RibbonBar sample. View class catch it.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
Alex ![]() Groupie ![]() ![]() Joined: 12 May 2004 Status: Offline Points: 54 |
![]() ![]() ![]() ![]() ![]() |
Hello,
You're talking about the RibbonSample ?
void CMainFrame::OnRibbonTabChanged(NMHDR* pNMHDR, LRESULT* pRes)
{ NMXTPTABCHANGE* pNMTabChanged = (NMXTPTABCHANGE*)pNMHDR; if (pNMTabChanged->pTab){ TRACE(_T("Tab Changed, Caption = %s\n"), (LPCTSTR)pNMTabChanged->pTab->GetCaption());} * pRes = 0;} Thanks, but I already found this solution.But how can I be sure that the USER actually select the new tab ?
This event will also be fired when I change the tab programmatically.
Alex
|
|
www.ANKHOR.com
Product: Xtreme ToolkitPro version 15.2.1 Platform: Windows 7 Ultimate (64bit) Language: Visual C++ 2005 / 2008 / 2010 |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
Yes, this code. You always can set some flag before change Tab programmatically and check it in yor handler.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
Alex ![]() Groupie ![]() ![]() Joined: 12 May 2004 Status: Offline Points: 54 |
![]() ![]() ![]() ![]() ![]() |
Hmm, wouldn't it be more reliable to hand this information over to the program via the NMXTPTABCHANGE structure ?
The event will be send from within the ribbon bar as well ( and is then out of my control ).
|
|
www.ANKHOR.com
Product: Xtreme ToolkitPro version 15.2.1 Platform: Windows 7 Ultimate (64bit) Language: Visual C++ 2005 / 2008 / 2010 |
|
![]() |
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 |