Backported wxComboCtrl::ShouldDrawFocus() from wxWidgets 2.9. This makes wxMSW wxOwnerDrawnComboBox look more native when wxCB_READONLY is used.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@64397 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Jaakko Salli
2010-05-26 15:08:54 +00:00
parent a01ef3cc40
commit 42d8454f34

View File

@@ -371,8 +371,8 @@ public:
bool ShouldDrawFocus() const
{
const wxWindow* curFocus = FindFocus();
return ( !IsPopupShown() &&
(curFocus == this || (m_btn && curFocus == m_btn)) &&
return ( IsPopupWindowState(Hidden) &&
(curFocus == m_mainCtrlWnd || (m_btn && curFocus == m_btn)) &&
(m_windowStyle & wxCB_READONLY) );
}