added wxTextEntry common base class for both wxTextCtrl and wxComboBox; refactor wxGTK code to put common parts of these classes in the base class; fixed some inconsistencies in the text control behaviour between platforms
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48944 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -129,9 +129,9 @@ wxRichTextCtrl::wxRichTextCtrl(wxWindow* parent,
|
||||
bool wxRichTextCtrl::Create( wxWindow* parent, wxWindowID id, const wxString& value, const wxPoint& pos, const wxSize& size, long style,
|
||||
const wxValidator& validator, const wxString& name)
|
||||
{
|
||||
if (!wxTextCtrlBase::Create(parent, id, pos, size,
|
||||
style|wxFULL_REPAINT_ON_RESIZE,
|
||||
validator, name))
|
||||
if (!wxControl::Create(parent, id, pos, size,
|
||||
style|wxFULL_REPAINT_ON_RESIZE,
|
||||
validator, name))
|
||||
return false;
|
||||
|
||||
if (!GetFont().Ok())
|
||||
@@ -252,7 +252,8 @@ void wxRichTextCtrl::Clear()
|
||||
LayoutContent();
|
||||
Refresh(false);
|
||||
}
|
||||
SendTextUpdatedEvent();
|
||||
|
||||
wxTextCtrl::SendTextUpdatedEvent(this);
|
||||
}
|
||||
|
||||
/// Painting
|
||||
@@ -1879,7 +1880,7 @@ bool wxRichTextCtrl::DoLoadFile(const wxString& filename, int fileType)
|
||||
PositionCaret();
|
||||
SetupScrollbars(true);
|
||||
Refresh(false);
|
||||
SendTextUpdatedEvent();
|
||||
wxTextCtrl::SendTextUpdatedEvent(this);
|
||||
|
||||
if (success)
|
||||
return true;
|
||||
@@ -2078,7 +2079,7 @@ void wxRichTextCtrl::DoSetValue(const wxString& value, int flags)
|
||||
{
|
||||
// still send an event for consistency
|
||||
if (flags & SetValue_SendEvent)
|
||||
SendTextUpdatedEvent();
|
||||
wxTextCtrl::SendTextUpdatedEvent(this);
|
||||
}
|
||||
DiscardEdits();
|
||||
}
|
||||
@@ -2095,7 +2096,7 @@ void wxRichTextCtrl::DoWriteText(const wxString& value, int flags)
|
||||
GetBuffer().InsertTextWithUndo(m_caretPosition+1, valueUnix, this, wxRICHTEXT_INSERT_WITH_PREVIOUS_PARAGRAPH_STYLE);
|
||||
|
||||
if ( flags & SetValue_SendEvent )
|
||||
SendTextUpdatedEvent();
|
||||
wxTextCtrl::SendTextUpdatedEvent(this);
|
||||
}
|
||||
|
||||
void wxRichTextCtrl::AppendText(const wxString& text)
|
||||
|
Reference in New Issue
Block a user