I'd like to display rich text in my list view control..
Any ideas?
Thanks!
--Ben
Printable View
I'd like to display rich text in my list view control..
Any ideas?
Thanks!
--Ben
are you meaning you wish to show text in rtf format? or that you wish to select some text in a richtextbox and make it appear in a listview?
Heh, if only it were that easy. :)
No, I actually want to show it formatted , I can get the plain text out of the RTF control using the .text property, but I'd like the bolding and everything to carry over...
Probably not gonna happen, huh.
Thanks,
Ben
oh you mean like this ....
VB Code:
[color=blue]Dim[/color] lvi [color=blue]As New[/color] ListViewItem() [color=blue]With[/color] lvi .ForeColor = RichTextBox1.SelectionColor .Font = RichTextBox1.SelectionFont .Text = RichTextBox1.SelectedText [color=blue]End With[/color] ListView1.Items.Add(lvi) [color=blue]End Sub[/color]
Almost. :) I wanted the whole thing to transfer over. So if 1/3rd is bolded, 1/3rd Italics, 1/3rd Underlined, and 1/3rd All of those things (does that add up? :)) it shows that way in the item.
It's not a big deal, just would be a 'nice-to-have'.
--Ben