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

Hiding & Showing Right-docked Toolwindows

9 Answers 494 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Ryan
Top achievements
Rank 1
Ryan asked on 30 Nov 2015, 06:01 PM

Hello,

 

I have a toolwindow that is docked to to a tooltabstrip on the right side of my raddock (this is the only toolwindow on this particular tooltabstrip) in the designer. I need to hide this toolwindow and show it again in the same place. However, both of these code snippets cause the toolwindow to be moved to the tooltabstrip that is docked on the left side of the raddock:

RadDock1.AutoHideWindows(New DockWindow() {tw}, AutoHidePosition.Right)

and

tw.AutoHide()

 
I heard that once you hide the last toolwindow on a tooltabstrip, the tooltabstrip is disposed, so I set 

tw.CloseAction = DockWindowCloseAction.Hide

but this did not help.

 

If I just call 

tw.Show()

the toolwindow will automatically dock to the right side, and when I click the 'Auto Hide' button, the toolwindow is "minimized" and added to a tooltabstrip on the right side. How can I accomplish this behavior programatically?

 

Thanks in advance!

9 Answers, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 01 Dec 2015, 02:13 PM
Hello Ryan,

Thank you for writing.

You can just set the DockState:
Partial Public Class RadForm1
    Inherits Telerik.WinControls.UI.RadForm
 
    Private tw As New ToolWindow()
    Public Sub New()
        InitializeComponent()
        tw.CloseAction = DockWindowCloseAction.Hide
        radDock1.DockWindow(tw, DockPosition.Right)
        radDock1.AutoHideWindows(New DockWindow() { tw }, AutoHidePosition.Right)
    End Sub
 
    Private Sub radButton1_Click(ByVal sender As Object, ByVal e As EventArgs)
        tw.DockState = DockState.AutoHide
 
    End Sub
 
    Private Sub radButton2_Click(ByVal sender As Object, ByVal e As EventArgs)
        tw.DockState = DockState.Docked
    End Sub
End Class

Please let me know if there is something else I can help you with. 
 
Regards,
Dimitar
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Ryan
Top achievements
Rank 1
answered on 02 Dec 2015, 03:38 PM

Hi Dimitar,

Thanks for your prompt response! I think I was a little unclear in my initial explanation, but I managed to work it out. I actually wanted to hide the toolwindow in its entirety (not just dock it) and then make it reappear. I worked around this using the following code (is this creating multiple instances of the same toolwindow?):

Partial Public Class RadForm1
    Inherits Telerik.WinControls.UI.RadForm
  
    Private tw As New ToolWindow()
    Public Sub New()
        InitializeComponent()
        radDock1.DockWindow(tw, DockPosition.Right)
        radDock1.AutoHideWindows(New DockWindow() { tw }, AutoHidePosition.Right)
    End Sub
  
    Private Sub radButton1_Click(ByVal sender As Object, ByVal e As EventArgs)
        radDock1.DockWindow(tw, DockPosition.Right)
        radDock1.AutoHideWindows(New DockWindow() { tw }, AutoHidePosition.Right)
    End Sub
  
    Private Sub radButton2_Click(ByVal sender As Object, ByVal e As EventArgs)
        tw.DockState = DockState.Hidden
    End Sub
End Class

Next (unrelated, and I'm not sure if this is even possible), but is there a way to expand the toolwindow to the right, extending the edge of the RadDock? The only way I can think of is by changing it into a floating window and setting it's location programmatically upon click, and then docking it again if the user clicks on anything but the toolwindow.

0
Ryan
Top achievements
Rank 1
answered on 02 Dec 2015, 04:14 PM

So I thought this had solved my problem, but the real problem actually turned out to be that I was calling 

RadDock1.AutoHideWindow(othertw)

after I set the location of tw. othertw is docked on the left side, and after this was called, the original tw would move from the right side to the left side.

 

I'm submitting a bug report now - this doesn't seem like the expected behavior to me...

0
Dimitar
Telerik team
answered on 03 Dec 2015, 11:55 AM
Hi Ryan,

Thank you for writing back.

I noticed your report and I have logged the issue. The item details are located here: FIX. RadRichTextEditor - exception when the imported HTML document contains invalid image source path.

Do not hesitate to contact us if you have other questions.
 
Regards,
Dimitar
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Ryan
Top achievements
Rank 1
answered on 03 Dec 2015, 02:09 PM

Dimitar,

The link you meant to post is here: FIX. RadDock- the AutoHideWindow method changes the position of an already hidden window, just in case anyone else has this same issue :)

0
Dimitar
Telerik team
answered on 04 Dec 2015, 09:16 AM
Hello Ryan,

Yes, I have posted a wrong link, sorry for that.  Should you have any other questions do not hesitate to ask.

Regards,
Dimitar
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Danny
Top achievements
Rank 1
Iron
Veteran
Iron
answered on 02 Aug 2019, 10:56 PM
Estimado
y no quiero que sea Docked si no que sea visible como cuando el mouse esta encima del ToolWindows, que poiedad la hace visible ?
toolGuiaRapida.DockState = DockState.?
0
Danny
Top achievements
Rank 1
Iron
Veteran
Iron
answered on 02 Aug 2019, 10:57 PM
Dear and I do not want it to be Docked if it is not visible as when the mouse is on the ToolWindows, what kind of visibility makes it visible? toolGuiaRapida.DockState = DockState.?
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 07 Aug 2019, 11:08 AM
Hello, Danny, 

When a ToolWindow is autohidden (DockState.AutoHide), you can see only a button with the ToolWindow's caption on the right side. Once you hover it, the auto-hide popup is shown. This behavior can be invoked by calling the RadDock.ShowAutoHidePopup method passing the respective ToolWindow as a parameter:

public RadForm1()
{
    InitializeComponent();
    this.toolWindow2.DockState = Telerik.WinControls.UI.Docking.DockState.AutoHide;
}
 
private void radButton1_Click(object sender, EventArgs e)
{
    this.radDock1.ShowAutoHidePopup(this.toolWindow2);
}

I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Dock
Asked by
Ryan
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Ryan
Top achievements
Rank 1
Danny
Top achievements
Rank 1
Iron
Veteran
Iron
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or