We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Behavior text in rectangles

Hi,
Could you please explain a little bit about the behavior of the text in rectangles? because I have noted that sometimes it doesn't appear, other times it accommodates itself in the rectangle, and in other situations it cuts the word.

Thanks in advance.

1 Reply

AD Administrator Syncfusion Team November 28, 2006 05:51 PM UTC

Hi Erick,

It is possible to display the text with in rectangle. But all we need to do is that measure the size of the contents for which we are using MeasureString property. It is used for calculate the size of the string that is to be displayed.

If we don’t use the MeasureString property then we will not be able to draw the text within the rectangle.

Could you please refer the following sample. It will fulfill your needs.

TextInRectangle.zip


Please take a look at this and let me if the problem still exists.

Regards,
Prakash.

Loader.
Live Chat Icon For mobile
Up arrow icon