forward ported patch to IsEditable()

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21721 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2003-07-06 21:43:00 +00:00
parent 01c6f3724e
commit fdd55287d8
2 changed files with 18 additions and 4 deletions

View File

@@ -1086,7 +1086,7 @@ void wxTextCtrl::Remove( long from, long to )
wxCHECK_RET( m_text != NULL, wxT("invalid text ctrl") );
#ifdef __WXGTK20__
if ( m_windowStyle & wxTE_MULTILINE )
if (m_windowStyle & wxTE_MULTILINE)
{
GtkTextBuffer *
text_buffer = gtk_text_view_get_buffer( GTK_TEXT_VIEW(m_text) );
@@ -1227,7 +1227,14 @@ bool wxTextCtrl::IsEditable() const
wxCHECK_MSG( m_text != NULL, FALSE, wxT("invalid text ctrl") );
#ifdef __WXGTK20__
return gtk_editable_get_editable(GTK_EDITABLE(m_text));
if (m_windowStyle & wxTE_MULTILINE)
{
return gtk_text_view_get_editable(GTK_TEXT_VIEW(m_text));
}
else
{
return gtk_editable_get_editable(GTK_EDITABLE(m_text));
}
#else
return GTK_EDITABLE(m_text)->editable;
#endif