Print Page | Close Window

Trapping RibbonTab Execute Event

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=9953
Printed Date: 08 October 2024 at 6:33am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Trapping RibbonTab Execute Event
Posted By: tbarnes8978
Subject: Trapping RibbonTab Execute Event
Date Posted: 24 March 2008 at 4:47pm
I have a RibbonBar with 5 tabs.
I run my application and trying to identify which tab was clicked in the commandbar_even() event; but I can't find it anywhere.

I appreciate any help someone can give.

Thanks!




Replies:
Posted By: wlcabral
Date Posted: 24 March 2008 at 8:54pm
When you select any control in a ribbonBar e Execute() event is fired, the same occurs when you click on a Tab.
 
we have some special Ids to identify this controls :
 

#DEFINE XTP_ID_RIBBONCONTROLTAB           9604 

#DEFINE XTP_ID_RIBBONCUSTOMIZE            9607 

#DEFINE XTP_ID_CUSTOMIZE_ADDORREMOVE      9122 

#DEFINE XTP_ID_CUSTOMIZE_RESET            9123 

#DEFINE XTP_ID_TOOLBAR_EXPAND             9148 

#DEFINE XTP_ID_TOOLBAR_HIDE               9149 

#DEFINE XTP_ID_WORKSPACE_CANCEL           9159 

#DEFINE XTP_ID_WINDOWLIST                 35000

#DEFINE XTP_ID_WORKSPACE_ACTIONS          35002

#DEFINE XTP_ID_TOOLBARLIST                59392

 
you need to check this ids in Execute event, this code (MS VFOXPRO) can give you some idea ...
 
if control.id = XTP_ID_RIBBONCONTROLTAB
   oRibbon = control.parent
   oTab = oRibbon.selectedTab
 
   ? oTab.Id, oTab.Caption
endif
 

 



-------------
wlcabral



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