ListView Sent to RichTextBox for File Preview

  • Thread starter Thread starter Paulywog0667_Laptop
  • Start date Start date
P

Paulywog0667_Laptop

Guest
Is there a way to send ListView data to a RichTextBox as a string? I need the data in a RichTextBox to preview before sending to .rtf.

Or, are richtextboxes generally easier for basic columns and text to send as 1 string?





Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim Des3 = textbox1.Text
Dim amt3 = textbox2.Text
Dim str3(3) As String
Dim itm3 As ListViewItem
str3(0) = DateTimePicker3.Text
str3(1) = Des3
str3(2) = amt3
itm3 = New ListViewItem(str3)
ListView1.Items.Add(itm3)

RichTextBox1.Text = ListView1.Text
RichTextBox1.SaveFile("C:\temp\RTFDocument1.rtf", RichTextBoxStreamType.RichText)
Process.Start("C:\temp\RTFDocument1.rtf")
End Sub

Continue reading...
 

Similar threads

P
Replies
0
Views
95
Paulywog0667_Laptop
P
M
Replies
0
Views
149
muhammadanzar
M
A
Replies
0
Views
156
AndyNakamura
A
J
Replies
0
Views
124
J0hnny09
J
Back
Top