IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl, wxControl)
BEGIN_EVENT_TABLE(wxTextCtrl, wxControl)
- EVT_CHAR(wxTextCtrl::OnChar)
EVT_DROP_FILES(wxTextCtrl::OnDropFiles)
- EVT_ERASE_BACKGROUND(wxTextCtrl::OnEraseBackground)
END_EVENT_TABLE()
#endif
// TODO write text to control
}
+void wxTextCtrl::AppendText(const wxString& text)
+{
+ // TODO append text to control
+}
+
void wxTextCtrl::Clear()
{
// TODO
txt[plen] = (char)c; // append c
txt[plen+xtra] = '\0'; // append '\0' or overwrite c
// If the put area already contained \0, output will be truncated there
- WriteText(txt);
+ AppendText(txt);
delete[] txt;
}
wxTextCtrl& wxTextCtrl::operator<<(const wxString& s)
{
- WriteText(s);
+ AppendText(s);
return *this;
}
{
wxString str;
str.Printf("%.2f", f);
- WriteText(str);
+ AppendText(str);
return *this;
}
{
wxString str;
str.Printf("%.2f", d);
- WriteText(str);
+ AppendText(str);
return *this;
}
{
wxString str;
str.Printf("%d", i);
- WriteText(str);
+ AppendText(str);
return *this;
}
{
wxString str;
str.Printf("%ld", i);
- WriteText(str);
+ AppendText(str);
return *this;
}
buf[0] = c;
buf[1] = 0;
- WriteText(buf);
+ AppendText(buf);
return *this;
}