How to reduce margins around label in node, so the label would not wrap?
Hello!
Attachment: node_label_margin_d2701949.zip
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
SIGN IN To post a reply.
3 Replies
SK
Swarnesh Krishna Kumar
Syncfusion Team
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:
Regards,
Swarnesh K
TA
Tagir
January 14, 2015 08:47 AM UTC
Hello Swarnesh!
Attachment: node_label_margin2_de05d522.zip
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
SK
Swarnesh Krishna Kumar
Syncfusion Team
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
SIGN IN To post a reply.
- 3 Replies
- 2 Participants
-
TA Tagir
- Jan 13, 2015 11:00 PM UTC
- Jan 19, 2015 11:56 AM UTC