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.

Custom rendering and resizing

Thread ID:

Created:

Updated:

Platform:

Replies:

72156 Mar 5,2008 11:33 AM Mar 12,2008 09:20 AM Windows Forms 2
loading
Tags: Diagram
GMiller
Asked On March 5, 2008 11:33 AM

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


Administrator [Syncfusion]
Replied On March 10, 2008 03:39 PM

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


Glenn Miller
Replied On March 12, 2008 09:20 AM

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

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.

;