protected virtual DiagramText CreateLabel() { DiagramText text1 = new DiagramText(); text1.Selectable = false; text1.Multiline = true; text1.Editable = true; this.Editable = true; return text1; }
protected virtual DiagramText CreateLabel(string name) { DiagramText text1 = null; if (name != null) { text1 = new DiagramText(); text1.Text = name; text1.Selectable = false; text1.Alignment = 1; } return text1; }
protected virtual DiagramText CreateLabel(string name) { DiagramText text1 = new DiagramText(); text1.Text = name; text1.Selectable = false; return text1; }
protected virtual DiagramText CreateLabel(bool top, string text) { DiagramText text1 = null; if (text != null) { text1 = new DiagramText(); text1.Text = text; text1.Selectable = false; if (this.Orientation == System.Windows.Forms.Orientation.Vertical) { if (top) { text1.Alignment = 0x40; } else { text1.Alignment = 0x100; } } else if (top) { text1.Alignment = 0x80; } else { text1.Alignment = 0x20; } text1.Editable = true; this.Editable = true; } return text1; }
public virtual DiagramText CreateText(string s, int idx) { DiagramText text1 = new DiagramText(); text1.Selectable = false; text1.Alignment = 1; text1.Multiline = true; text1.BackgroundOpaqueWhenSelected = true; text1.BackgroundColor = Color.LightBlue; text1.DragsNode = true; text1.Text = s; text1.Wrapping = true; if (this.ItemWidth > 0f) { text1.WrappingWidth = this.ItemWidth; text1.Width = this.ItemWidth; } return text1; }
private void PositionLabel(DiagramText lab, int spot, PointF pt) { if (spot == 2) { lab.Alignment = spot; lab.SetSpotLocation(0x10, pt); if ((this.Handle != null) && DiagramShape.IntersectsRect(this.Handle.Bounds, lab.Bounds)) { pt.X = this.Handle.Right + 2f; lab.SetSpotLocation(0x10, pt); } } else if (spot == 4) { lab.Alignment = spot; lab.SetSpotLocation(8, pt); } else if (spot == 8) { lab.Alignment = spot; lab.SetSpotLocation(4, pt); } else if (spot == 0x10) { lab.Alignment = spot; lab.SetSpotLocation(2, pt); } else { lab.Alignment = this.SpotOpposite(spot); lab.SetSpotLocation(this.SpotOpposite(spot), pt); } }
protected virtual DiagramText CreateLabel() { DiagramText text1 = new DiagramText(); text1.Selectable = false; text1.Alignment = 0x80; text1.Wrapping = true; text1.Bold = true; text1.Editable = true; return text1; }