Posted 14 years ago by barrett
Avatar
I use the Wizard control and having problems with getting the Cancel button to fire on all of my pages. The Test Application has examples for Protected Overrides Sub OnCancelButtonClick, however if I try and follow the example I get an error becasue I am not overriding a Sub in a base class. Which way should i go?

Thanks

Comments (3)

Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Sorry but I'm not following what the problem is. If you use WizardDialogForm you can override OnCancelButtonClick like we do in the sample project. However if you are handling the CancelButtonClick events on the individual WizardPage instances, those event handlers will fire and the OnCancelButtonClick method will not.


Actipro Software Support

Posted 14 years ago by barrett
Avatar
I put the Wizard control on a form that Inherits System.Windows.Forms.Form, not Inherits ActiproSoftware.Wizard.WizardDialogForm. So if i try and override, as shown in the example, I get an error because I am not overriding a Sub in a base class.

So, I tried the following

Private Sub WizardPageJoint_CancelButtonClick(ByVal sender As Object, ByVal e As ActiproSoftware.Wizard.WizardPageCancelEventArgs) Handles WizardPageJoint.CancelButtonClick
'do whatever
End Sub

But get the following error

Method 'WizardPageJoint_CancelButtonClick' cannot handle Event 'CancelButtonClick' because they do not have the same signature.
Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
There are two different CancelButtonClick events. The Wizard control fires one that takes that signature. If you attach to that one, it will work. If you attach to the page specific ones instead, the I believe it's just an EventHandler since you already know which page the event handler is for. The class library documentation tells you exactly what type of delegate to use for all of these.


Actipro Software Support

The latest build of this product (v2018.1 build 0341) was released 6 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.