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

tool window auto hide but not collapse

2 Answers 160 Views
Dock
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 07 Jan 2013, 09:24 PM
i have a raddock with 2 areas, the top is a doc manager and the bottom is a tool window.
i have the tool window buttons set to only autohide.  when the user auto hides though, i want it to stay open to a certain size.  (say 300 px tall) instead of collapsing.  this would let them still see and edit stuff on the tool window.  when they open and pin it, it should be bigger (say 700 px etc).  so it's not really collapsing, just being made smaller.  is there a way to do this with the tool window or something similar?

thanks!

2 Answers, 1 is accepted

Sort by
0
Accepted
Stefan
Telerik team
answered on 10 Jan 2013, 06:11 PM
Hello John,

Thank you for writing.

Yes, it is possible to use the ToolWindow collapse button to perform some action - change its width in this case. Attached you can find a sample application demonstrating how to implement it. Basically, I am subscribing to the Click event of the AutoHideButton initially, and one more time when the ToolWindows dock state changes, because this might lead to recreating the whole window, thus I will loose my event subscription.

Also, when the user attempts to auto hide the window, I am canceling the operation and I am setting the window Tag, so I can later use it to determine which size should I set.

Let me know if you need further clarification of this approach.

Greetings,
Stefan
the Telerik team
Q3'12 SP1 of RadControls for WinForms is out now. See what's new.
0
John
Top achievements
Rank 1
answered on 10 Jan 2013, 06:44 PM
exactly what i needed thank you.
Tags
Dock
Asked by
John
Top achievements
Rank 1
Answers by
Stefan
Telerik team
John
Top achievements
Rank 1
Share this question
or