void InsertText(String text)
{
// TODO: Make sure fits (implement maxlength)
if (HasSelection)
{
EraseSelection();
}
if (m_CursorPos > TextLength)
m_CursorPos = TextLength;
if (!IsTextAllowed(text, m_CursorPos))
return;
String str = Text;
str = str.Insert(m_CursorPos, text);
SetText(str);
m_CursorPos += text.Length;
m_CursorEnd = m_CursorPos;
RefreshCursorBounds();
}