Control Development

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am experimenting with a custom edit Box control for .Net. There I want to control the display of editable text. For example, I want to draw my text by leaving 4 pixel from the start, and want to restrict my Text display ny leaving 4 pixel in the top area and 4 pixel in the bottom area
ALso, I would like to change the text selection color in the edit box
When I inherit from TextBox, I do not get much control, as ownerDraw is not available for editBox. Is there any idea ? Is NativeCall is the only way, then I have to totally re-invent the wheel

Rgds
sandee
 
The Textbox is a special control as far as Microsoft is concerned. Overriding its paint methods does not seem to help in its customizations. Try overriding its WndProc method and look for the Msg value of 15 and paint your string and everything else.. One more thing, you may have to re-invent the wheel with respect to this control, if your needs grow beyond the default behavior by leaps and bounds.
 
Back
Top