Add search control to the focus guard
This commit is contained in:
parent
2d696c3606
commit
f524d9bec2
|
@ -20,6 +20,7 @@
|
|||
#include <wx/dcclient.h>
|
||||
#include <wx/listbox.h>
|
||||
#include <wx/dataview.h>
|
||||
#include <wx/srchctrl.h>
|
||||
#include <wx/stc/stc.h>
|
||||
#include <widgets/ui_common.h>
|
||||
|
||||
|
@ -170,12 +171,14 @@ void KIUI::SelectReferenceNumber( wxTextEntry* aTextEntry )
|
|||
bool KIUI::IsInputControlFocused()
|
||||
{
|
||||
wxWindow* focus = wxWindow::FindFocus();
|
||||
|
||||
wxTextEntry* textEntry = dynamic_cast<wxTextEntry*>( focus );
|
||||
wxStyledTextCtrl* styledText = dynamic_cast<wxStyledTextCtrl*>( focus );
|
||||
wxListBox* listBox = dynamic_cast<wxListBox*>( focus );
|
||||
wxDataViewCtrl* dataViewCtrl = dynamic_cast<wxDataViewCtrl*>( focus );
|
||||
wxSearchCtrl* searchCtrl = dynamic_cast<wxSearchCtrl*>( focus );
|
||||
|
||||
return ( textEntry || styledText || listBox || dataViewCtrl );
|
||||
return ( textEntry || styledText || listBox || dataViewCtrl || searchCtrl );
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue