Skip to Content
0
Aug 18, 2011 at 05:50 AM

How to set text object size correctly at runtime?

250 Views

Hi,

I am using vs2010, c# to write a win form application.

I need to create text objects at runtime. The problem is that I could not find a way to know the correct size of the text object I should set. I tried use .net textbox to get the width and height, then multiply 15. The result is the height seems OK, but the width is too wide. I couldn't find something like CreateGraphics(); MeasureString() in crystal text object. Please help me for this problem.

Thanks.