Added wxInfoBar::Dismiss().

Add a method to conveniently hide the info bar and update the parent layout.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62284 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2009-10-05 22:56:07 +00:00
parent bc061c8ede
commit 0b1add25fd
6 changed files with 38 additions and 8 deletions

View File

@@ -177,17 +177,26 @@ void wxInfoBar::ShowMessage(const wxString& msg, int flags)
UpdateParent();
}
void wxInfoBar::Dismiss()
{
if ( !UseNative() )
{
wxInfoBarGeneric::Dismiss();
return;
}
Hide();
UpdateParent();
}
void wxInfoBar::GTKResponse(int btnid)
{
wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, btnid);
event.SetEventObject(this);
if ( !HandleWindowEvent(event) )
{
Hide();
UpdateParent();
}
Dismiss();
}
GtkWidget *wxInfoBar::GTKAddButton(wxWindowID btnid, const wxString& label)