Nevron Forum
Back
Login
Register
Login
Register
Home
»
Nevron Open Vision for NET
»
NOV Diagram for .NET
»
How to set font size and style for each shape file
How to set font size and style for each shape file
Post Reply
How to set font size and style for each shape file
View
Flat Ascending
Flat Descending
Threaded
Options
Subscribe to topic
Print This Topic
Goto Topics Forum
Author
Message
Kirk Kanjian
Kirk Kanjian
posted 3 Years Ago
ANSWER
Topic Details
Group: Forum Members
Posts: 8,
Visits: 18
Hi
I am using Nevron diagram and trying to set Font size and style for each shape.
But it is taking the last shape style for the entire renderings.
Please let me know how to set font styles for each shape
Code used for setting font style for each shape:
For Each s As NShape In document.Descendants(NFilters.Shape2D, -1)
If Not IsNothing(s.Tag) Then
Dim roomInfo As RoomInfo = s.Tag
Dim roomNumber As String = roomInfo.RoomNumber
Dim customFontSize as Single = roomInfo.CustomFontSize
Dim textSize As Single
If Not String.IsNullOrEmpty(customFontSize ) Then
textSize = Convert.ToSingle(customFontSize )
Dim textStyle As New NTextStyle
textStyle = s.ComposeTextStyle()
textStyle.FontStyle = New NFontStyle("Arial", textSize)
NStyle.SetTextStyle(s, textStyle)
End If
End If
Next
Reply
Like
0
GO
Merge Selected
Merge into selected topic...
Merge into merge target...
Merge into a specific topic ID...
Open Merge
Threaded View
Threaded View
How to set font size and style for each shape file
Kirk Kanjian
-
3 Years Ago
Hi, By default the composed text style is the text style of the...
Nevron Support
-
3 Years Ago
Hi, I implemented the code and cloned the shapefile style. But still...
Kirk Kanjian
-
3 Years Ago
Hi Kirk, A better solution would be to create a custom...
Nevron Support
-
3 Years Ago
Post Reply
Similar Topics
Post Quoted Reply
Reading This Topic
Login
Login
Remember Me
Reset Password
Resend Validation Email
Login
Explore
Messages
Mentions
Search