virtual void Replace(long from, long to, const wxString& value);
virtual void Remove(long from, long to) = 0;
virtual void Clear() { SetValue(wxString()); }
+ void RemoveSelection();
// clipboard operations
return from < to;
}
+void wxTextEntryBase::RemoveSelection()
+{
+ long from, to;
+ GetSelection(& from, & to);
+ if (from != -1 && to != -1)
+ Remove(from, to);
+}
+
wxString wxTextEntryBase::GetStringSelection() const
{
long from, to;
void wxComboBox::OnDelete(wxCommandEvent& WXUNUSED(event))
{
- long from, to;
- GetSelection(& from, & to);
- if (from != -1 && to != -1)
- Remove(from, to);
+ RemoveSelection();
}
void wxComboBox::OnSelectAll(wxCommandEvent& WXUNUSED(event))
void wxComboBox::OnDelete(wxCommandEvent& WXUNUSED(event))
{
- long from, to;
- GetSelection(& from, & to);
- if (from != -1 && to != -1)
- Remove(from, to);
+ RemoveSelection();
}
void wxComboBox::OnSelectAll(wxCommandEvent& WXUNUSED(event))
void wxTextCtrl::OnDelete(wxCommandEvent& WXUNUSED(event))
{
- long from, to;
- GetSelection(& from, & to);
- if (from != -1 && to != -1)
- Remove(from, to);
+ RemoveSelection();
}
void wxTextCtrl::OnSelectAll(wxCommandEvent& WXUNUSED(event))