How to split text in nevron shape?


Author
Message
surendra koritala
surendra koritala
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
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
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,

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

Best Regards,
Nevron Support Team


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