Click here to Skip to main content
15,891,253 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello
I am trying to open my child forms in tabcontrol that I have put it in main (parent) form insted of for example "center screen" as usual.

here is my code that I have tried :

C#
private void MainForm_Load(object sender, EventArgs e)
{

    AddDocumentManager();
    for (int i = 0; i < 3; i++)
    {
        AddChildForm();
    }
}

void AddDocumentManager()
{
    DocumentManager manager = new DocumentManager();
    manager.MdiParent = this;
    manager.View = new TabbedView();
}
int count;
void AddChildForm()
{
    Form childForm = new Form();
    childForm.Text = "Child Form " + (++count).ToString();

    SimpleButton btn = new SimpleButton();
    btn.Text = "Button " + count.ToString();
    btn.Parent = childForm;

    childForm.MdiParent = this;
    childForm.Show();
}


Thanks in Advance

What I have tried:

I have tried code above and some similar code in Devexpess documents, but could not find the answer
Posted
Updated 12-Sep-16 22:23pm

1 solution

Follow this: Q537413 - Create tab page from another form | DevExpress Support Center[^]. It contains complete project.

For DocumentManager i've found only this: T134798 - How to insert a form inside a tab of XtraTabControl | DevExpress Support Center[^]

I'd suggest to post further questions about DevExpress's controls on their site.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900