Catching event inside class |
Post Reply |
Author | |
terjep
Newbie Joined: 26 August 2011 Location: Norway Status: Offline Points: 2 |
Post Options
Thanks(0)
Posted: 26 August 2011 at 3:43am |
We have a common custom class for the ribbon used by every forms in our application which have (simplified) a Public Function SetupMenu(ByRef theMenu As Object) where theMenu is the CommandBars added to a form.
Inside SetupMenu I have added a new quick access button which I want to take care of the event for inside our custom common class without having to call a class function from the xx_Execute() in every form in the application. Set Ribbonbar = theMenu.AddRibbonBar("The Ribbon") Set Control = Ribbonbar.QuickAccessControls.Add(xtpControlButton, ix, "Feedback") I have tried with Private WithEvents Feedback As CommandBars but doesn't get it to work at all. It works great with keybindings, but this isn't what I need. Private WithEvents FeedbackKeys As KeyBindings Set FeedbackKeys = theMenu.KeyBindings I have tried multiple ways of setting the Feedback but havn't got anyone of them working, either I get type mismatch error or my custom event handler doesn't get called at all. Any suggestions?
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
Also don't see quick solution. Think you can only wrap CommandBars to some UserControl and place it to each form instead or should add function call with each CommandBars_Execute.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
terjep
Newbie Joined: 26 August 2011 Location: Norway Status: Offline Points: 2 |
Post Options
Thanks(0)
|
To bad :( Anyone else?
|
|
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 |