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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

textnode height

Thread ID:

Created:

Updated:

Platform:

Replies:

102054 Dec 19,2011 10:13 PM UTC Jan 2,2012 01:25 PM UTC WinForms 5
loading
Tags: Diagram
songjian
Asked On December 19, 2011 10:13 PM UTC

I have already known the string content and I want to display the string in the textnode,How to go the textnode height when the textnode width is known and I also want to set up textnode linesapce? Thank you.


Amsath Ali M [Syncfusion]
Replied On December 21, 2011 12:18 PM UTC

Hi Songjian,

Thanks for your interest in Syncfusion products.

Since we are unable to get your actual intention form your query, could you please share us more information probably a screenshot which clearly describe your intentions, which will be more helpful for us to provide a better solution to you?

Please let us know if you have any queries.

Regards,
Amsath Ali. M



songjian
Replied On December 23, 2011 02:49 PM UTC

My question is that if I have knows the content of the textnode.text and the textnode width and I also want to set the textnode line space ,how to compute the textnode height.Thank you.


Pandi Murugan A [Syncfusion]
Replied On December 26, 2011 07:44 AM UTC

Hi Songjian,

Thanks for the update. We regret for the inconvenience caused.

You can use the below code for your requirement.

[C#]
TextNode txtNode = new TextNode("This is an example");
float width = 25;
SizeF size = SizeF.Empty;
if (size == SizeF.Empty && txtNode.Text != string.Empty)
{
using (Graphics gfx = Graphics.FromHwnd(IntPtr.Zero))
{
Font fntTemp = txtNode.FontStyle.CreateFont();
size = gfx.MeasureString(txtNode.Text, fntTemp, (int)width, txtNode.GetStringFormat());
}
}
//textNode height
float height = size.Height;

Please let me know if you have any concerns.

Regards,
Pandi Murugan A



songjian
Replied On December 29, 2011 01:07 AM UTC

Thank you. The textnode doesn't have the linespace property, but I want to set the linespace when the textnode has multiline. How to solve it? Thank you.


Amsath Ali M [Syncfusion]
Replied On January 2, 2012 01:25 PM UTC

Hi Songjian,

Thanks for the update.

Currently, we don’t have support to “Linespace property for TextNode” and your request has been suspected to be a feature. For this, please create a DT incident for your query so that we can update the patch for this feature.

You can create the DT incident from the following link.
<http://www.syncfusion.com/account/dashboard>

In the interests of maintaining confidentiality, we have a policy of not sharing patches or otherwise proprietary customer specific information in the public Forum.

Please let us know if you have any queries.

Regards,
Amsath Ali. M





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.

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

;