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
close icon

Prevent text from scaling when a node is resized

Hi, I'm trying to create my own Post-It style Symbol similar to the one in the PostitComment example, but instead of stretching the text out when the user resizes the symbol (the behavior in the examples), I want it to keep the text the same size and have it wrap around the new vertical boundaries of the symbol. How can I do this?

2 Replies

J. J.Nagarajan Syncfusion Team November 29, 2006 11:58 PM UTC

Hi Eric,

If your intention is to keep the label's text the same size and have to wrap around the new vertical boundaries of the symbol then please set the " SymbolLabel.AdjustToContainerBounds" property to true. Please refer to the following code snippet

protected override void OnBoundsChanged(BoundsEventArgs evtArgs)
{
//Specify if the label size will be adjusted when the symbol width changed.
lbl.AdjustToContainerBounds = true;
base.OnBoundsChanged(evtArgs);
}

Please refer to the attached sample that demonstrates this completely. Please refer to it and let me know if you have any questions.

Thanks for using Syncfusion product.

Regards,
Nagaraj.

SymbolLabel.zip


AD Administrator Syncfusion Team November 30, 2006 06:00 AM UTC

That's just what I was after, thanks!

Loader.
Live Chat Icon For mobile
Up arrow icon