Implemented wxStatusBar::Push/PopStatusText.
Implemented wxFrame::Push/PopSTatusText ( just forward to the status bar ). Implemented wxFrame::DoGiveHelp, to show menu/toolbar help in the status bar. Added Get/SetStatusBarPane to get/set the status bar pane the menu/toolbar help will be show in git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15339 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -507,26 +507,15 @@ void wxToolBarBase::OnMouseEnter(int id)
|
||||
event.SetEventObject(this);
|
||||
event.SetInt(id);
|
||||
|
||||
(void)GetEventHandler()->ProcessEvent(event);
|
||||
|
||||
wxFrame *frame = wxDynamicCast(GetParent(), wxFrame);
|
||||
if ( !frame )
|
||||
return;
|
||||
|
||||
wxString helpstring;
|
||||
|
||||
if ( id != -1 )
|
||||
if( frame )
|
||||
{
|
||||
wxToolBarToolBase *tool = FindById(id);
|
||||
if ( tool )
|
||||
helpstring = tool->GetLongHelp();
|
||||
wxToolBarToolBase* tool = id == -1 ? (wxToolBarToolBase*)0 : FindById(id);
|
||||
wxString help = tool ? tool->GetLongHelp() : wxString();
|
||||
frame->DoGiveHelp( help, id != -1 );
|
||||
}
|
||||
|
||||
// set the status text anyhow, even if the string is empty: this ensures
|
||||
// that it is cleared when the mouse leaves the toolbar or enters a tool
|
||||
// without help
|
||||
if (frame->GetStatusBar())
|
||||
frame->SetStatusText(helpstring);
|
||||
(void)GetEventHandler()->ProcessEvent(event);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user