我可以在列表视图项子项中加粗单词吗?



我可以在列表视图中做这样的事情吗?
1 | 福 |酒吧12 |x |
2 | FOO | 32| Y |

在这种情况下,我想加粗特定的单词"bar"。
是否可以在列表视图中使用,或者是否有任何替代方法可以使其工作?

这可能对你有用...

Dim item1 As New ListViewItem
item1.Text = "Item 1 BOLD"
item1.UseItemStyleForSubItems = False      'Set this to FALSE to allow changing the subitem font. It is TRUE by default.
item1.Font = New Font(ListView1.Font, FontStyle.Bold)
item1.SubItems.Add("Sub Item Normal")
item1.SubItems(1).Font = New Font(ListView1.Font, FontStyle.Regular)
ListView1.Items.Add(item1)

最新更新