MDI RadRibbonForm - Close all Child MDIs

2 posts, 0 answers
  1. Jimmy
    Jimmy avatar
    1 posts
    Member since:
    Jul 2014

    Posted 12 Dec 2014 Link to this post


    I'm unable to close all MDI childs in once.
    I've used the following code:

    Public Class RadRibbonForm1
        Private Sub RadButtonElement1_Click(sender As Object, e As System.EventArgs) Handles RadButtonElement1.Click
            Dim childForm As New Form()
            childForm.Text = "MDI Child " & DateTime.Now.ToShortTimeString()
            childForm.MdiParent = Me
        End Sub
        Private Sub RadButtonElement2_Click(sender As Object, e As System.EventArgs) Handles RadButtonElement2.Click
            Dim frmChild As Form
            For Each frmChild In Me.MdiChildren
        End Sub
        Public Sub New()
            ' This call is required by the designer.
            ' Add any initialization after the InitializeComponent() call.
            Me.IsMdiContainer = True
            With Me.RadDock1
                .AutoDetectMdiChildren = True
                .ShowDocumentCloseButton = True
                .ToolWindowInsertOrder = Telerik.WinControls.UI.Docking.DockWindowInsertOrder.ToBack
            End With
        End Sub
    End Class
  2. Dimitar
    Dimitar avatar
    2818 posts

    Posted 17 Dec 2014 Link to this post

    Hi Jimmy,

    Thank you for writing.

    You can close the windows by using the the CloseAllWindows method of the dock:
    Private Sub radButton2_Click(sender As Object, e As EventArgs)
    End Sub

    Detailed information can be found here: Removing ToolWindow and DocumentWindow at Runtime.

    Please let me know if there is something else I can help you with. 

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top