Home Forums WinForms controls Other WinForms controls Window Autohide event

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #18512 |

    Hi,

    Is there an event on the toolwindow or DockLayoutManager that tells me when an window auto hides?  (an OnAutoHide)?

    I need to refresh the window under it because the painting is bad.

    Thanks

    Imported from legacy forums. Posted by Lee (had 3444 views)

    User (Old forums)
    Member
    Post count: 23064

    You can subscribe to the StateChanged event on the ToolWindow, and in the event handler, verify what is the state of the ToolWindow, and respond accordingly.

    e.g:

    void toolButtonsVertical_StateChanged( object sender, EventArgs e )

    {

        ToolWindow toolWindow = sender as ToolWindow;

        if( toolWindow.State == ToolWindowState.AutoHide )

        {

            //do what you need

        }

    }

     

    Imported from legacy forums. Posted by André (had 278 views)

    User (Old forums)
    Member
    Post count: 23064

    Hmmm…I actually tried that – what I need is after the window is set to autohide…I need to know when it “swooshes” back into its tab

    Thanks

    Imported from legacy forums. Posted by Lee (had 371 views)

    User (Old forums)
    Member
    Post count: 23064

    Unfortunately, there is nothing for this.  However, we are a bit surprised by the “bad painting” you mentioned.  Would you have a code snippet that we could use to try to reproduce the issue?

    Imported from legacy forums. Posted by André (had 306 views)

    User (Old forums)
    Member
    Post count: 23064

    Hmmm – not the current code I have (it is quite a large app) but I have a side piece I run tests in.  I will see what I can do there.

    Imported from legacy forums. Posted by Lee (had 4542 views)

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.