Results 1 to 5 of 5

Thread: Displaying Rich Text in a Listview Item..

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2001
    Location
    Buffalo, NY
    Posts
    297

    Displaying Rich Text in a Listview Item..

    I'd like to display rich text in my list view control..

    Any ideas?

    Thanks!

    --Ben

  2. #2
    Frenzied Member dynamic_sysop's Avatar
    Join Date
    Jun 2003
    Location
    Ashby, Leicestershire.
    Posts
    1,142
    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?
    ~
    if a post is resolved, please mark it as [Resolved]
    protected string get_Signature(){return Censored;}
    [vbcode][php] please use code tags when posting any code [/php][/vbcode]

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2001
    Location
    Buffalo, NY
    Posts
    297
    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

  4. #4
    Frenzied Member dynamic_sysop's Avatar
    Join Date
    Jun 2003
    Location
    Ashby, Leicestershire.
    Posts
    1,142
    oh you mean like this ....
    VB Code:
    1. [color=blue]Dim[/color] lvi [color=blue]As New[/color] ListViewItem()
    2.         [color=blue]With[/color] lvi
    3.             .ForeColor = RichTextBox1.SelectionColor
    4.             .Font = RichTextBox1.SelectionFont
    5.             .Text = RichTextBox1.SelectedText
    6.         [color=blue]End With[/color]
    7.         ListView1.Items.Add(lvi)
    8.     [color=blue]End Sub[/color]
    ~
    if a post is resolved, please mark it as [Resolved]
    protected string get_Signature(){return Censored;}
    [vbcode][php] please use code tags when posting any code [/php][/vbcode]

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2001
    Location
    Buffalo, NY
    Posts
    297
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width