This is a migrated thread and some comments may be shown as answers.

Setting the Selected Document Pane

1 Answer 55 Views
Dock
This is a migrated thread and some comments may be shown as answers.
fgalarraga
Top achievements
Rank 1
fgalarraga asked on 18 Jun 2007, 02:46 AM
How do you call form using the docking manager and set the select Document Pane.

I tried this code but it does not set the correct focus to the Document Pane I am looking for.

Thank you!

    Private Sub RadButton2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadButton2.Click
        Dim frmShowSearch As DialogResult
        Dim frmSearch As New Search
        frmSearch.DocumentPane2.Select()
        frmSearch.DocumentPane2.Activate()
        frmShowSearch = frmSearch.ShowDialog()
    End Sub

1 Answer, 1 is accepted

Sort by
0
Julian Benkov
Telerik team
answered on 18 Jun 2007, 08:17 AM
Hello Frank,

you can use the Shown event of your search form. In the event handler call documentPane2.Activate(). The form must be loaded and visible before activating any IDockable item. Your search form will be only created and shown:

Private Sub RadButton2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadButton2.Click 
    Dim frmShowSearch As DialogResult 
    Dim frmSearch As New Search 
    frmShowSearch = frmSearch.ShowDialog() 
End Sub  

FYI, we have improved the Activation/Deactivation behavior of the DockingManager quite a bit for SP2. It will be available for download early next week.


Sincerely yours,
Julian Benkov
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Dock
Asked by
fgalarraga
Top achievements
Rank 1
Answers by
Julian Benkov
Telerik team
Share this question
or