Document window is resizable

3 posts, 0 answers
  1. Tino
    Tino avatar
    86 posts
    Member since:
    Jul 2017

    Posted 14 Nov 2017 Link to this post

    I have RadForm-derived class that I'm adding as RadDock document windows. How do I make them stay the same size as the container? Please see attachment.

     

    The code I'm using is something like this:

    var view = new MyView(rule)
    {
        Dock = DockStyle.Fill,
        TopLevel = false,
        FormBorderStyle = FormBorderStyle.None,
        MdiParent = this,
        Text = "blah",
    };
     
    view.Show();
    var wnd = new DocumentWindow {Text = "blah"};
    wnd.Controls.Add(view);
    radDock1.AddDocument(wnd);

     

    I'm using an older version of Telerik at the moment. The version of RadDock.dll is 2017.3.912.40 and Runtime version is v4.0.30319.

  2. Tino
    Tino avatar
    86 posts
    Member since:
    Jul 2017

    Posted 14 Nov 2017 Link to this post

    Just realized how wrong that code was, which I wrote early in the project.

    This should work, from the docs. I just tried it and it's kind of there but still showing the border/resize grip, but probably because I changed lots of properties of my form when experimenting.

     

    Configuring the Parent Form
     
    C#VB.NET
    private void Form1_Load(object sender, EventArgs e)
    {
        this.IsMdiContainer = true;
        this.radDock1.AutoDetectMdiChildren = true;
    }
    3. Add a form to the project that will serve the role of child form. No properties, methods or event handlers need to be set for this form, except that you may want to add some content that will be visible when the child forms are displayed as tabbed documents.
     
    4. Add code to the parent form to create the child form and assign it an MDI parent:
     
    C#VB.NET
    private void radMenuItem1_Click(object sender, EventArgs e)
    {
        Form childForm = new Form();
        childForm.Text = "MDI Child " + DateTime.Now.ToShortTimeString();
        childForm.MdiParent = this;
        childForm.Show();
    }
  3. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3958 posts

    Posted 17 Nov 2017 Link to this post

    Hello, Tino,

    Thank you for writing.  

    I am glad that the problem you were facing is now resolved. Should you have further questions I would be glad to help.

    Regards,
    Dess
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top