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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Auto size rich text

Thread ID:

Created:

Updated:

Platform:

Replies:

68430 Sep 21,2007 07:18 AM UTC Sep 21,2007 05:35 PM UTC WinForms 1
loading
Tags: Diagram
Abacusoft
Asked On September 21, 2007 07:18 AM UTC

Hi,

I am evaluating syncfusion drawing component.
Please tell me, how can customize text node and rich text node to auto size.
what i want is when user expands text node object it should not only expand the text node object area but also its text like in WORD ART.

any help would be appreciated.

Mohamed Suhaib Fahad A. [Syncfusion]
Replied On September 21, 2007 05:35 PM UTC

Hi,

Thanks for evaluating Syncfusion products.

At present, RichTextNode and TextNode do not support the Auto Font resize with respect to Node resize.

However we do have a way to get this done. By changing the font size in the Model resizing event which will be triggered while resizing the Node will meet this requirement.

[C#]

((DocumentEventSink)diagram1.Model.EventSink).SizeChanging += new SizeChangingEventHandler(Form1_SizeChanging);

void Form1_SizeChanging(SizeChangingEventArgs evtArgs)
{
TextNode node = (TextNode)this.diagram1.Model.Nodes.FindNodeByName(evtArgs.NodeAffected.Name);
node.FontStyle.Size += -(evtArgs.Offset.Height / 2);

}

Please refer the below sample,
http://websamples.syncfusion.com/samples/Diagram.Windows/F68430/main.htm

Please let me know if you want any more details.

Regards,
Fahad

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;