Implement auto complete in generic wxSearchCtrl
Just forward the relevant methods to the embedded wxTextCtrl. Closes #17519.
This commit is contained in:
committed by
Vadim Zeitlin
parent
e85b8f1a4b
commit
e7a526604c
@@ -81,6 +81,7 @@ All (GUI):
|
||||
- Make wxDataViewCtrl::Expand() expand ancestors in native ports too.
|
||||
- Add wxDataViewCtrl::SetHeaderAttr().
|
||||
- Add wxListCtrl::SetHeaderAttr().
|
||||
- Implement auto complete in generic wxSearchCtrl (Eric Jensen).
|
||||
|
||||
wxGTK:
|
||||
|
||||
|
@@ -166,6 +166,11 @@ public:
|
||||
virtual void SelectAll() wxOVERRIDE;
|
||||
virtual void SetEditable(bool editable) wxOVERRIDE;
|
||||
|
||||
// Autocomplete
|
||||
virtual bool DoAutoCompleteStrings(const wxArrayString &choices) wxOVERRIDE;
|
||||
virtual bool DoAutoCompleteFileNames(int flags) wxOVERRIDE;
|
||||
virtual bool DoAutoCompleteCustom(wxTextCompleter *completer) wxOVERRIDE;
|
||||
|
||||
#if 0
|
||||
|
||||
// override streambuf method
|
||||
|
@@ -820,6 +820,24 @@ bool wxSearchCtrl::SetBackgroundColour(const wxColour& colour)
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// Autocomplete
|
||||
bool wxSearchCtrl::DoAutoCompleteStrings(const wxArrayString &choices)
|
||||
{
|
||||
return m_text->AutoComplete( choices );
|
||||
}
|
||||
|
||||
bool wxSearchCtrl::DoAutoCompleteFileNames(int flags)
|
||||
{
|
||||
return flags == wxFILE ? m_text->AutoCompleteFileNames() : m_text->AutoCompleteDirectories();
|
||||
}
|
||||
|
||||
bool wxSearchCtrl::DoAutoCompleteCustom(wxTextCompleter *completer)
|
||||
{
|
||||
return m_text->AutoComplete(completer);
|
||||
}
|
||||
|
||||
|
||||
// search control generic only
|
||||
void wxSearchCtrl::SetSearchBitmap( const wxBitmap& bitmap )
|
||||
{
|
||||
|
Reference in New Issue
Block a user