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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to make label / textnode fixed size

Thread ID:





48151 Aug 21,2006 02:46 PM UTC Aug 26,2006 02:50 AM UTC WinForms 4
Tags: Diagram
David Whatley
Asked On August 21, 2006 02:46 PM UTC

How do I configure a label or textnode such that the text doesn''t change it''s size. I want the text to clip to the bounds I''ve defined (otherwise there''s no way to layout things exactly as I want). I''d like for the label to do the "..." thing automatically if it doesn''t fit (a built in feature of many text-related controls in .NET).

Everything I try just causes the label or textnode to resize itself when the text doesn''t fit. :(

-- David

Administrator [Syncfusion]
Replied On August 22, 2006 09:22 AM UTC

Hi David,

Thanks for your interest in Syncfusion products.

We are working on the query that you have raised here and will get back to you on this before the end of the day.

Thank you for your patience.


David Whatley
Replied On August 23, 2006 07:56 PM UTC

Did you forget me? :)

-- David

Administrator [Syncfusion]
Replied On August 24, 2006 04:52 PM UTC

Hi David,

My sincere apologizes for the delay in getting back to you.If you want to retain the Symbol Label''s size,then you can set a fixed value to the Symbol label within the Diagram.Property changed event.Please refer the following code snippet

private void diagram1_PropertyChanged(object sender, Syncfusion.Windows.Forms.Diagram.PropertyEventArgs evtArgs)
if(evtArgs.Node is Syncfusion.Windows.Forms.Diagram.Label && evtArgs.PropertyName == "Text")
//Set the fixed size to the SymbolLabel
label.Size=new SizeF(float width,float height);

Please refer the attached sample that demonstrate this completely and let me know if you have any questions. We will be glad to assist you.

Thank you,

Fixed TextNode.zip

David Whatley
Replied On August 26, 2006 02:50 AM UTC

I dunno... I''m generating lots of labels dynamically at run-time and they have different sizes. This doesn''t have a way of knowing what the size was before it changed. Doesn''t seem like a good solution... but also not sure how to get it to work in the situation I have (which is more real-world).

Any ideas?

-- David


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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