Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - Ribbon Bar Tab Event Issue
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Ribbon Bar Tab Event Issue

 Post Reply Post Reply
Author
Message
vijaymahajan View Drop Down
Groupie
Groupie
Avatar

Joined: 16 June 2008
Status: Offline
Points: 92
Post Options Post Options   Thanks (0) Thanks(0)   Quote vijaymahajan Quote  Post ReplyReply Direct Link To This Post Topic: Ribbon Bar Tab Event Issue
    Posted: 27 August 2008 at 12:55am
Hello,
Whenever we call SetCurSel() function of ribbon bar,the particular tab gets selected.
But the problem is the SetCurSel() function calls the TabEventHandler of ribbon bar.
 
I have 6 tabs on my ribbon bar. whenever user switches a tab,i ask him to save the document. On that message i have kept 3 buttons -Yes,No,Cancel. In first two cases of yes and no,its fine.But when user clicks the cancel button,it should come back to previous tab. This coming back to previous tab we can manage. For that i have called the SetCurSel() function.
 
It also works,But as the setcursel() function calls the tabs event handler,I cant maintain the state of controls in that tab.
 
Can we avoid the event handler call in this case to maintain the controls state in the tab?
 
Please guide me accordingly. 
Back to Top
vijaymahajan View Drop Down
Groupie
Groupie
Avatar

Joined: 16 June 2008
Status: Offline
Points: 92
Post Options Post Options   Thanks (0) Thanks(0)   Quote vijaymahajan Quote  Post ReplyReply Direct Link To This Post Posted: 27 August 2008 at 5:37am
Please suggest the possible answer for this.
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 27 August 2008 at 5:52am
Hi,
 
try catch TCN_SELCHANGING and return TRUE if you don't want change tab.
Copy some code from our sample.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.047 seconds.