Use the Graphics.MeasureString method to measure the text. See:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlr
fsystemdrawinggraphicsclassmeasurestringtopic.asp

Signature
HTH,
Kevin Spencer
Microsoft MVP
Professional Numbskull
Show me your certification without works,
and I'll show my certification
*by* my works.
> Hi Everyone,
>
[quoted text clipped - 15 lines]
>
> Mark
Mark E Mark - 30 Mar 2006 14:29 GMT
Thanks Kevin,
I have used that in the past, for different applications.
Would you know by any chance how to set the tab size to be 45 pixels on
the same RichEditcontrol?
Regards
Mark
Kevin Spencer - 30 Mar 2006 18:09 GMT
Tab size? AFAIK, the RichEditControl doesn't have any tabs. You *are*
talking about the MFC Windows API RichEditControl, right?

Signature
HTH,
Kevin Spencer
Microsoft MVP
Professional Numbskull
Show me your certification without works,
and I'll show my certification
*by* my works.
> Thanks Kevin,
>
[quoted text clipped - 6 lines]
>
> Mark