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.

How to make label / textnode fixed size

Thread ID:

Created:

Updated:

Platform:

Replies:

48151 Aug 21,2006 10:46 AM Aug 25,2006 10:50 PM Windows Forms 4
loading
Tags: Diagram
David Whatley
Asked On August 21, 2006 10:46 AM

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 05:22 AM


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.

Regards,
Meera.

David Whatley
Replied On August 23, 2006 03:56 PM

Did you forget me? :)

-- David

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


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,
Meera.

Fixed TextNode.zip

David Whatley
Replied On August 25, 2006 10:50 PM

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

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.

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.

;