Hello there
I hope you can help us with this pesky problem. We are using version 20.1.403.0 of Actipro Wizard. If we need to upgrade to a newer version to fix the issue, please let me know.
Problem:
We are trying to add controls dynamically to WizardPages at runtime. This breaks the layout of the pages so that the controls are moved over the header of the InnerPage.
We want our Wizard to look like this
Instead it looks like this
How to reproduce the problem:
You should be able to reproduce the problem easily with the following code snippet:
namespace WindowsFormsApp1
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
ActiproSoftware.Products.ActiproLicenseManager.RegisterLicense(@"CM Informatik AG", @"XXXX-XXXX-XXXX-XXXX-XXXX");
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new TestWizard());
}
}
public class TestWizard: WizardDialogForm
{
public TestWizard()
{
this.Wizard.Pages.Add(new TestPage());
}
}
public class TestPage : WizardPage
{
public TestPage()
{
AddButton();
}
private void AddButton()
{
Button b = new Button();
b.Text = "Click me, try resizing the form to fix layout";
b.Dock = DockStyle.Top;
b.Click += BOnClick;
this.Controls.Add(b);
}
private void BOnClick(object sender, EventArgs e)
{
AddButton();
}
}
}
Best Regards
Matthias Hess
CM Informatik AG