DBText的文字样式
Dim mtxtTitle As New DBTextmtxtTitle.TextString = TextBox_title.Text
'mtxtTitle.Height = titleh
mtxtTitle.TextStyleName
mtxtTitle.Layer = ComboBox_layer.SelectedItem
有个用户自定义样式user3,我想文本设置为user3,但是 mtxtTitle.TextStyleName是只读属性,应该怎么设置啊?
请高手指教,谢谢!
用 TextStyleId试试 果然可以
Dim stId As ObjectId = HostApplicationServices.WorkingDatabase.TextStyleTableId
Dim stObj As TextStyleTable = stId.GetObject(OpenMode.ForRead)
For Each trId As ObjectId In stObj
Dim tr As TextStyleTableRecord = trId.GetObject(OpenMode.ForRead)
If tr.Name = "USER3" Then
mtxtTitle.TextStyleId = tr.ObjectId
End If
Next
页:
[1]