X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/52999871ced63078110ace34fc5d3abc9af0be6a..dd71bfb9921430755a885117cc6c9843c62dafda:/src/common/combocmn.cpp diff --git a/src/common/combocmn.cpp b/src/common/combocmn.cpp index a256b660c4..0b5b37d372 100644 --- a/src/common/combocmn.cpp +++ b/src/common/combocmn.cpp @@ -905,6 +905,7 @@ void wxComboCtrlBase::Init() m_extRight = 0; m_marginLeft = -1; m_iFlags = 0; + m_textCtrlStyle = 0; m_timeCanAcceptClick = 0; m_resetFocus = false; @@ -968,7 +969,7 @@ wxComboCtrlBase::CreateTextCtrl(int style, const wxValidator& validator) // not used by the wxPropertyGrid and therefore the tab is processed by // looking at ancestors to see if they have wxTAB_TRAVERSAL. The // navigation event is then sent to the wrong window. - style |= wxTE_PROCESS_TAB; + style |= wxTE_PROCESS_TAB | m_textCtrlStyle; if ( HasFlag(wxTE_PROCESS_ENTER) ) style |= wxTE_PROCESS_ENTER; @@ -2033,21 +2034,18 @@ void wxComboCtrlBase::DestroyPopup() if ( m_popup ) m_popup->RemoveEventHandler(m_popupEvtHandler); - delete m_popupEvtHandler; + wxDELETE(m_popupEvtHandler); - delete m_popupInterface; + wxDELETE(m_popupInterface); if ( m_winPopup ) { m_winPopup->RemoveEventHandler(m_popupWinEvtHandler); - delete m_popupWinEvtHandler; - m_popupWinEvtHandler = NULL; + wxDELETE(m_popupWinEvtHandler); m_winPopup->Destroy(); + m_winPopup = NULL; } - m_popupEvtHandler = NULL; - m_popupInterface = NULL; - m_winPopup = NULL; m_popup = NULL; } @@ -2545,6 +2543,14 @@ wxCoord wxComboCtrlBase::GetNativeTextIndent() const return DEFAULT_TEXT_INDENT; } +void wxComboCtrlBase::SetTextCtrlStyle( int style ) +{ + m_textCtrlStyle = style; + + if ( m_text ) + m_text->SetWindowStyle(style); +} + // ---------------------------------------------------------------------------- // methods forwarded to wxTextCtrl // ----------------------------------------------------------------------------