Print Page | Close Window

Ribbon Bar Tab Event Issue

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=11982
Printed Date: 28 February 2025 at 6:34pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Ribbon Bar Tab Event Issue
Posted By: vijaymahajan
Subject: Ribbon Bar Tab Event Issue
Date 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. 



Replies:
Posted By: vijaymahajan
Date Posted: 27 August 2008 at 5:37am
Please suggest the possible answer for this.


Posted By: Oleg
Date 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



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net