Profile Picture

How to split text in nevron shape?

Posted By surendra koritala 10 Years Ago
Author
Message
surendra koritala
Posted 10 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)

Group: Forum Members
Last Active: 10 Years Ago
Posts: 1, Visits: 8
Hi,
Here's my doubt:
How can i split text in nevron shape and assign different fontstyles for different lines of text.
For examples: lets us consider below two lines as my shape.Text:       
USA
Land Of Opportunities

I want to make USA as bolded in shape text and rest of the text as normal. Please find below code i am using for customizing text format in nevron shape:

Font ftName = new Font("Arial", 10, FontStyle.Bold);
Font ftInputs = new Font("Arial", 10);

shape.Style.FillStyle = new NSizeF(width, (height/2));
shape.CollapsedSize = new NColorFillStyle(backgroundColor);

shape.Name = name;
shape.Text = shapeText;

shape.Tag = tag;

NTextStyle textStyle = new NTextStyle(ftInputs, IOsColor); //Create a NTextStyle object

textStyle.StringFormatStyle.HorzAlign = Nevron.HorzAlign.Left; //Horizontal alignment
textStyle.StringFormatStyle.VertAlign = Nevron.VertAlign.Top; //Vertical alignment
textStyle.Offset =new NPointL(2, 2); //The offset within the object

NStyle.SetTextStyle(shape, textStyle); //Set the objects text style

In the above code, textStyle is customizing entire text to font: arial , 10.

I want shape name to be bolded. my text contains shape name and additional text. how to make shape name bolded.

Regards,
Suren

 

           

 

           

 

 



Nevron Support
Posted 10 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)

Group: Forum Members
Last Active: Last Year
Posts: 3,039, Visits: 3,746
Hi,

You can use XML formatted texts. Take a look at XML Formatted Texts documentation topic for more information.

Best Regards,
Nevron Support Team





Similar Topics


Reading This Topic