tool window auto hide but not collapse

3 posts, 1 answers
  1. John
    John avatar
    60 posts
    Member since:
    Nov 2006

    Posted 07 Jan 2013 Link to this post

    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. Answer
    Stefan
    Admin
    Stefan avatar
    2890 posts

    Posted 10 Jan 2013 Link to this post

    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.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. John
    John avatar
    60 posts
    Member since:
    Nov 2006

    Posted 10 Jan 2013 Link to this post

    exactly what i needed thank you.
Back to Top