Cancel closing

4 posts, 0 answers
  1. stealthsid
    stealthsid avatar
    21 posts
    Member since:
    Oct 2006

    Posted 27 Jun 2008 Link to this post

    I saw the recent post on how to hide the closing button. I need something different. I basically want to do this:

    void dockPanel3_Closing(object sender, System.ComponentModel.CancelEventArgs e)

    {

            dockPanel3.Visible =

    false;

            e.Cancel =

    true;

    }

    Instead of closing the dockPanel, I just want to hide it so that I can reconstitute it later without losing its contents.

    Currently, the "Closing" event is never called, even when I close the whole application.

    Thanks.

  2. Julian Benkov
    Admin
    Julian Benkov avatar
    1135 posts

    Posted 30 Jun 2008 Link to this post

    Hi Sidney,

    To hide DockPanel call Hide() method of DockPanel object instance.

     dockPanel3.Hide(); 

    And vice versa; in order to show DockPanel you can use Show() method

     dockPanel3.Show(); 

    This operation only Shows/Hides the DockPanel instance, and does not make changes to its content.

    If you have additional questions, please contact us.


    Sincerely yours,
    Julian Benkov
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center

  3. UI for WinForms is Visual Studio 2017 Ready
  4. stealthsid
    stealthsid avatar
    21 posts
    Member since:
    Oct 2006

    Posted 30 Jun 2008 Link to this post

    Thank you for the reply, however the problem that I have is that the "Closing" method is never fired, so I can't intercept the closing event to cause it to do something other than close.

    How do I intercept, and cancel, the closing event?

    Sid
  5. Julian Benkov
    Admin
    Julian Benkov avatar
    1135 posts

    Posted 01 Jul 2008 Link to this post

    Hi Sidney,

    We have found a problem related to Close/Closing event for IDockable windows. The fix will be available for Q2 release
    planned for the second half of this month.

    Sorry for the inconvenience caused and thank you for the feedback.
    Your Telerik points have been updated.

    Best wishes,
    Julian Benkov
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top