How do I add command button to wizard control


Author
Message
Danny Doobay
Danny Doobay
StrataFrame User (188 reputation)StrataFrame User (188 reputation)StrataFrame User (188 reputation)StrataFrame User (188 reputation)StrataFrame User (188 reputation)StrataFrame User (188 reputation)StrataFrame User (188 reputation)StrataFrame User (188 reputation)StrataFrame User (188 reputation)
Group: StrataFrame Users
Posts: 40, Visits: 333
Hello,

Wizard control comes with standard buttons like Help, Back, Next, Cancel and Finish. We would like to add couple more buttons to it and have method for them.

How do you do that?

tks
StrataFrame Team
S
StrataFrame Developer (6.3K reputation)StrataFrame Developer (6.3K reputation)StrataFrame Developer (6.3K reputation)StrataFrame Developer (6.3K reputation)StrataFrame Developer (6.3K reputation)StrataFrame Developer (6.3K reputation)StrataFrame Developer (6.3K reputation)StrataFrame Developer (6.3K reputation)StrataFrame Developer (6.3K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
You can change the text of the buttons to be anything you want, so if you don't need all of the buttons (like "Help", which is seldom used), you can take them over by changing the text and using the built-in handlers of the WizardControl.  Other than that, you can simply put a button on top of the wizard control.  It will belong to the page, but it will get rendered in the right place.
Danny Doobay
Danny Doobay
StrataFrame User (188 reputation)StrataFrame User (188 reputation)StrataFrame User (188 reputation)StrataFrame User (188 reputation)StrataFrame User (188 reputation)StrataFrame User (188 reputation)StrataFrame User (188 reputation)StrataFrame User (188 reputation)StrataFrame User (188 reputation)
Group: StrataFrame Users
Posts: 40, Visits: 333
We are using the help button. We want to add two more buttons but simply dropping a button on the surface on the wizard control is not working. 

Button is there on design time but on run time it is not displayed.

Anyone knows why?
StrataFrame Team
S
StrataFrame Developer (6.3K reputation)StrataFrame Developer (6.3K reputation)StrataFrame Developer (6.3K reputation)StrataFrame Developer (6.3K reputation)StrataFrame Developer (6.3K reputation)StrataFrame Developer (6.3K reputation)StrataFrame Developer (6.3K reputation)StrataFrame Developer (6.3K reputation)StrataFrame Developer (6.3K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
The problem is that the button has been added to the controls collection of the WizardControl instead of the Form.  You need to shrink the WizardControl so that you can see some of the Form and then drag the button to the Form or edit the InitializeComponent() method and change the

this.wizardControl1.Controls.Add(this.button1);

to this

this.Controls.Add(this.button1);

After you do that, you can change z-order of the button (bring to front) if necessary to get it on top of the wizard control.  You'll notice though, that the button has a little border around it that doesn't match the other buttons, that's because it belongs to the form, not the wizard control, so it's letting the forms back color show through.  You can fix this one of two ways: 1) add a panel that matches the back color of the footer of the WizardControl, make sure it's in the Form's Controls collection, and add your extra buttons to it or 2) change the back color of the Form to match the footer of the WizardControl.  The first option is probably best, because the second option will bleed through to all of the other controls that are marked as transparent, not just the button at the bottom.
Danny Doobay
Danny Doobay
StrataFrame User (188 reputation)StrataFrame User (188 reputation)StrataFrame User (188 reputation)StrataFrame User (188 reputation)StrataFrame User (188 reputation)StrataFrame User (188 reputation)StrataFrame User (188 reputation)StrataFrame User (188 reputation)StrataFrame User (188 reputation)
Group: StrataFrame Users
Posts: 40, Visits: 333
It worked. Tks.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search