1
Answer

Read, edit and write RTF files

Photo of Egbert

Egbert

16y
11.4k
1
Hi,
I like to use the RichInk or a simular control to read, edit and write existing RTF files.
 
Tried a few commercial controls like the one from www.dsrtech.com, but can't reach them by email (don't exist anymore??), http://www.spellbuddy.com/SukiRichInk/SukiRichInk.asp but no repsonses to emails.
 
Tried using the RichInk control from www.opennetcf.com, but can not find good examples for VS2005 and C# (there is only older stuff available).
 
Is there some controls and sample code (C# with VS2005) which I can use which shows me a little bit more about RichText control and the stuff I like to do.
For editting, I only like to change font color, size and type (bold, italic).
 
Thanks and best regards,
Egbert

Answers (1)

0
Photo of write2jey
NA 69 0 20y
listView.Items.Add(fileName) will add the parent item in the list view. Then you'd issue, listView.SubItems.Add(subItem) to add subitems under the parent item in ONE row. Imagine how the Windows Explorer displays files. First Filename, Data, Size, etc etc. That's what it does. So, retrieve the data from using data reader and insert it right in the list view; listView.Items.Add(dataReaderReadItem); listView.SubItems.Add(dataReaderReadItemFromtheNextColumnInTheRow); If you need to do casting before adding..take care of that . Regards, JJ
0
Photo of Boblysan
NA 66 0 20y
Unfortunately it didn't.. :( What does the following line actually add in to the list view??? anything? listview.Items.Add(fileName); I am sort of new to all this so please forgive me.. I have a database which I can successfully connect to. I am trying to use the data reader to read records from a table and then populate this information in to the list view. I guess I don't understand how I can get the information from the DB... reader.GetInt32(0).tostring(), **as information for column 1 ** reader.GetString(1).tostring(), ** as information for column 2 **... etc.. Thanks, Bob
0
Photo of write2jey
NA 69 0 20y
You'll have to add the columns first, which you know how. Then add subitems under the columns: Follow this: listview.Items.Add(fileName); //fileName is your parent Column listview.Items[count].SubItems.Add(size); //size is the child under the Parent Column listview.Items[count].SubItems.Add(date); //another child. so this will look like in ListView with 3 columns. First row is the column. File Name Size Date fileName1 size1 date1 fileName2 size2 date2 Hope that helps. JJ