Moving figure label below the figure


Author
Message
Bartlomiej Zogala
Bartlomiej Zogala
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)
Group: Forum Members
Posts: 2, Visits: 1
Is it possible to display Text of some business shape factory figure below the figure ? Or what is the best way to implement it, grouping, or connecting some ports of figure and created label?
Nevron Support
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.2K

Hi,

The simplest way to move the text of a shape is to use the Offset property of the shape’s text style. For example: to move the text of a shape below it use the following piece of code:

 

NTextStyle textStyle = new NTextStyle();

textStyle.Offset = new NPointL(0, shape.Height / 2);

NStyle.SetTextStyle(shape, textStyle);



Best Regards,
Nevron Support Team


Volvick Derose
Volvick Derose
Forum Guru (71 reputation)Forum Guru (71 reputation)Forum Guru (71 reputation)Forum Guru (71 reputation)Forum Guru (71 reputation)Forum Guru (71 reputation)Forum Guru (71 reputation)Forum Guru (71 reputation)Forum Guru (71 reputation)
Group: Forum Members
Posts: 71, Visits: 1
You can create an additional label for a shape and use the NMargin
to set the position of that label. In this case, you can set the position below the shape


NBoundsLabel myLabel = new NBoundsLabel("my text", myShape.UniqueId, new Nevron.Diagram.NMargins(-4, -4, 11, -4));

//these numbers (-4, -4, 11, -4)); are used for the shape, you can play with your own number to get it right
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search