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

How to reduce margins around label in node, so the label would not wrap?

Thread ID:

Created:

Updated:

Platform:

Replies:

117964 Jan 13,2015 11:00 PM UTC Jan 19,2015 11:56 AM UTC WinForms 3
loading
Tags: Diagram
Tagir
Asked On January 13, 2015 11:00 PM UTC

Hello!
 I have a label inside of a node. The label is shorter than a node. Still the label is wrapped inside of the node, though visually it should fit.
How to reduce the margins around label inside of the node, so it would not wrap.
Don't suggest to use Label.WrapText =false as this will stop from wrapping long labels too.
See the screenshot for details.
Also some code here:
Thank you
Tagir


var shape = new Syncfusion.Windows.Forms.Diagram.Rectangle(0, 0, _discoverySettings.TaskWidth, _discoverySettings.TaskHeight, MeasureUnits.Millimeter);
          
            shape.FillStyle.Color = System.Drawing.Color.LightGreen;
            Syncfusion.Windows.Forms.Diagram.Label lbl = new Syncfusion.Windows.Forms.Diagram.Label();
            lbl.Text = name;
            lbl.FontStyle.Size = _discoverySettings.TaskFontSize;
            //lbl.WrapText = false;
            shape.Labels.Add(lbl);
           
            shape.PinPoint = new PointF(x, y);
            DiagramPage.Model.AppendChild(shape);

Attachment: node_label_margin_d2701949.zip

Swarnesh Krishna Kumar [Syncfusion]
Replied On January 14, 2015 06:46 AM UTC

Hi Tagir,

Thanks for using Syncfusion products.

We are afraid that we are not able to reproduce the reported issue in our side. Could you please provide us more information probably your sample or code to reproduce the reported issue?

Here is the Sample:

Sample

Let us know if any concern

Regards,

Swarnesh K


Tagir
Replied On January 14, 2015 08:47 AM UTC

Hello Swarnesh!
 Sorry I have to be more specific in the code.
I have attached a screenshot I get with this code.
Here is the code to try:
var shape = new Syncfusion.Windows.Forms.Diagram.Rectangle(0, 0, 20, 7, MeasureUnits.Millimeter);

            shape.FillStyle.Color = System.Drawing.Color.LightGreen;
            Syncfusion.Windows.Forms.Diagram.Label lblt = new Syncfusion.Windows.Forms.Diagram.Label();
            lblt.Text = "JOBS1";
            lblt.FontStyle.Size = 6;
            //lbl.WrapText = false;
            shape.Labels.Add(lblt);

            shape.PinPoint = new PointF(30, 100);
            testDiagram.Model.AppendChild(shape);




Attachment: node_label_margin2_de05d522.zip

Swarnesh Krishna Kumar [Syncfusion]
Replied On January 19, 2015 11:56 AM UTC

Hi Tagir,

Thanks for your interest in Syncfusion product.

We have analyzed the reported problem and we suspect this could be an issue. Please create an incident on behalf of this reported problem from the following link for better assistance.

Here is the link: link

Please let us know if you have any concerns.

Regards,

Swarnesh K

 


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

;