implement wxComboBox::SetEditable()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41097 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -64,6 +64,10 @@ All (GUI):
|
||||
- Support for right-to-left text layout (Diaa Sami during Google Summer of Code)
|
||||
- Added wxID_PAGE_SETUP standard id
|
||||
|
||||
wxMSW:
|
||||
|
||||
- Implemented wxComboBox::SetEditable()
|
||||
|
||||
wxMac:
|
||||
|
||||
- Add parameter to the --enable-universal_binary configure option for the path
|
||||
|
@@ -592,11 +592,13 @@ bool wxComboBox::IsEditable() const
|
||||
return !HasFlag(wxCB_READONLY);
|
||||
}
|
||||
|
||||
void wxComboBox::SetEditable(bool WXUNUSED(editable))
|
||||
void wxComboBox::SetEditable(bool editable)
|
||||
{
|
||||
// Can't implement in MSW?
|
||||
// HWND hWnd = GetHwnd();
|
||||
// SendMessage(hWnd, EM_SETREADONLY, (WPARAM)!editable, (LPARAM)0L);
|
||||
HWND hWnd = (HWND)GetEditHWND();
|
||||
if ( !::SendMessage(hWnd, EM_SETREADONLY, !editable, 0) )
|
||||
{
|
||||
wxLogLastError(_T("SendMessage(EM_SETREADONLY)"));
|
||||
}
|
||||
}
|
||||
|
||||
void wxComboBox::SetInsertionPoint(long pos)
|
||||
@@ -604,7 +606,6 @@ void wxComboBox::SetInsertionPoint(long pos)
|
||||
if ( GetWindowStyle() & wxCB_READONLY )
|
||||
return;
|
||||
|
||||
#ifdef __WIN32__
|
||||
HWND hWnd = GetHwnd();
|
||||
::SendMessage(hWnd, CB_SETEDITSEL, 0, MAKELPARAM(pos, pos));
|
||||
HWND hEditWnd = (HWND) GetEditHWND();
|
||||
@@ -615,7 +616,6 @@ void wxComboBox::SetInsertionPoint(long pos)
|
||||
// Why is this necessary? (Copied from wxTextCtrl::SetInsertionPoint)
|
||||
SendMessage(hEditWnd, EM_REPLACESEL, 0, (LPARAM) wxEmptyString);
|
||||
}
|
||||
#endif // __WIN32__
|
||||
}
|
||||
|
||||
void wxComboBox::SetInsertionPointEnd()
|
||||
|
Reference in New Issue
Block a user