title: Custom Text Box Component / Element (Not a Control)
body: <p>I am in need of a class that mimics a TextBox control but is not a Control, but instead a custom drawn component or element.</p>
  
  <p>Creating one feels like re-inventing the wheel since I see them everywhere.  For example, in any modern web browser the text boxes are not controls.  Most Winforms controls, especially ToolStrip controls such as ToolStripTextBox, have elements which behave like text boxes (but are not Controls).</p>
  
  <p>I assume that Microsoft doesn't reinvent the wheel for each control they make it.  But most likely their code is proprietary and not public.</p>
  
  <p>Does any one know of an open source solution for this?  I am experienced with GDI+ drawing but a text field is not a trivial task when you consider caret positioning, selection, and inserting text.</p>
  
  <p>Any pointers on how to go about writing the code myself would be appreciated, such as how to calculate the character at a given point.  Should I create a lookup table for the measured width of each possible character?  Or loop through MeasureString to take into account formatting space?</p>