Error converting type... |
Post Reply |
Author | |
random0000
Newbie Joined: 22 October 2003 Status: Offline Points: 7 |
Post Options
Thanks(0)
Posted: 12 November 2003 at 2:35am |
I am trying to implement a plugin system using you command bars and need to be able to have individual 'click' events for each commandbarcontrolbutton. I created my own class inheriting the CodeJock.XtremeCommandBars.CommandBarControlButton as shown below: Public Class MyCommandBarControlButton Public Event Click() Public Sub RE() I can add the MyCommandBarControlButton and it displays and works fine. However, in the the CommandBarManager ExecuteCommand event I try to cast the e.control returned back to a MyCommandBarControlButton in order to raise the click event. When I do the following: If TypeOf e.Control Is CodeJock.XtremeCommandBars.CommandBarControlButton Then I receive an invalid cast message. The type of the e.control is a commandbarcontrolbutton so it should work (I use this technique extensively in the treeview control). If there is a better way to implement individual click events I would appreciate any info! |
|
random0000
Newbie Joined: 22 October 2003 Status: Offline Points: 7 |
Post Options
Thanks(0)
|
Hello? Any ideas?
|
|
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 |