Profile Picture

Moving figure label below the figure

Posted By Bartlomiej Zogala 14 Years Ago
Author
Message
Bartlomiej Zogala
Posted 14 Years Ago
View Quick Profile
Forum Newbie

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
Last Active: 14 Years Ago
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
Posted 14 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 3,054, Visits: 4,009

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
Posted 14 Years Ago
View Quick Profile
Forum Guru

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
Last Active: 12 Years Ago
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



Similar Topics


Reading This Topic