Articles in this section
Category / Section

How do I add more Buttons along with the existing Navigation Buttons?

2 mins read

 

You can add more buttons to the wizard control along with the existing Navigation buttons by creating a new button and then by setting the GridBagLayout constraints for the button to position it correctly along with other buttons using GridPosX and GridPosY.

Here is the code snippet:

C#

// To add a new button

Button btn = new Button();

btn.Text = "New Button";

this.wizardControl1.Controls.Add(btn);

// Set the constraints for the newly created Button

this.wizardControl1.GridBagLayout.GetConstraintsRef(btn).GridPosX = 6;

this.wizardControl1.GridBagLayout.GetConstraintsRef(btn).GridPosY = 5;

VB

' To add a new button

Dim btn As Button = New Button()

btn.Text = "New Button"

Me.wizardControl1.Controls.Add(btn)

' Set the constraints for the newly created Button

Me.wizardControl1.GridBagLay.GetConstraintsRef(btn).GridPosX = 6

Me.wizardControl1.GridBagLay.GetConstraintsRef(btn).GridPosY = 5

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied