Hi There, How to draw border around text inside richtextbox control?
+1
A:
Not sure your question is quick specific enough, could you post a mockup of what you want?
...However... typically you'll go about doing somehting like this by overriding the OnPaint()
method of the RichTextBox
. There you can access the Graphics
object being used and grab whatever Brush
makes sense.
Also, in overriding OnPaint, make sure to call base.OnPaint(e)
prior to performing any of your custom work--without this nothing will show, and doing it after your custom work might undo your work.
STW
2010-07-18 14:33:58