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

Custom rendering and resizing

Greetings,

I'm a new customer to syncfusion, but have used other competitors toolkits for diagramming in the past.

now that I've moved in the Syncfusion Diagram arena, I have the following question/request.

I'm trying to make the functional equivalent of the "Class" object from UML, and have the following requirements:

1. Must be a rounded rectangle - DONE
2. Must have a line spacer between the header and body part of the object - DONE
3. The list of attributes for the entity is dynamic, and therefore the cause for this post....

How do I programmatically resize the node, based on the number of lines needed for the content, and is it possible to have the vertical size be resized automatically based on the length of the longest line in the content?

Thanks in advance,
Glenn Miller


2 Replies

AD Administrator Syncfusion Team March 10, 2008 07:39 PM UTC

Hi GMiller ,

Thanks for your interest in Syncfusion Products.

You can programatically resize the node by using its Size.Width and Size.Height properties. Could yo please provide some more details with screen shots about your requirement. It is very helpful to us to provide the solution at the earliest.

Thanks,
Nagaraj



GM Glenn Miller March 12, 2008 01:20 PM UTC

Hi,

Attached is a simple bitmap which shows the need.

After playing about with the labels collection, I understand how the labels are created with an object.

Items of note are (and please correct me if I am wrong:

1) Label text when specified as custom, still centers the label text
Question 1 becomes : How do I left or right justify the text at a specific X/Y location.
2) Because the text for an object is a collection, I should write a handler that resizes the object, based on the number of lines?
Question, is this logic correct?
3) By knowing the point size of the font in use, I should be able to determine (perhaps just closly), the maximum length for any label in the collection, and a handler can then size the object properly...
Question : is this understand or logic correct?

Thanks in advance,
Glenn

>Hi GMiller ,

Thanks for your interest in Syncfusion Products.

You can programatically resize the node by using its Size.Width and Size.Height properties. Could yo please provide some more details with screen shots about your requirement. It is very helpful to us to provide the solution at the earliest.

Thanks,
Nagaraj





sample.zip

Loader.
Live Chat Icon For mobile
Up arrow icon