This is a migrated thread and some comments may be shown as answers.

Fit shape size to text or fit text to shape size

4 Answers 75 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
Leo
Top achievements
Rank 1
Leo asked on 10 Jun 2015, 01:19 PM
I have been trying to determine how to make either a diagram shape size fit the text or fit the text to the shape size.  Can someone please explain how this can be done? 

4 Answers, 1 is accepted

Sort by
0
Vessy
Telerik team
answered on 12 Jun 2015, 03:10 PM
Hi Leo,

I have just answered your other thread on the subject, for convenience I am pasting my answer here as well:

RadDiagram does not provide a built-in functionality to automatically wrap the text of a shape, or to transfer it to multiple lines. The only possible way to achieve a similar fnctionality for the moment is to use the RadDiagram Visual template functionality and add several Tex objects to a shape, so each of them will be rendered as a separate row. A live example of such implementation is available in the RadDiagram Overview demo:  http://demos.telerik.com/aspnet-ajax/diagram/examples/overview/defaultcs.aspx

Regards,
Vessy
Telerik
0
Leo
Top achievements
Rank 1
answered on 12 Jun 2015, 03:17 PM
OK - I will give that a try.  Thank you for the response. 
0
Leo
Top achievements
Rank 1
answered on 12 Jun 2015, 04:59 PM
I have a follow up question.  I've got the code working that is breaking up the text into multiple text boxes.  However, it looks like the demo code also changes the size of the shape if it detects the text is too long.  However, even though the container expands, the shape doesn't.  It this by design or am I doing something wrong?  I've attached an image as an example.
0
Vessy
Telerik team
answered on 17 Jun 2015, 01:51 PM
Hi Leo,

I am afraid that the provided screenshot was not enough for me to reproduce and determine what is causing the problem. Can you send us the exact configuration needed to replicate such behavior?

Looking forward to your reply,
Vessy
Telerik
Tags
Diagram
Asked by
Leo
Top achievements
Rank 1
Answers by
Vessy
Telerik team
Leo
Top achievements
Rank 1
Share this question
or