Is it possible/feasible to have a single multi-line textbox that has two properties: 1. simple text format (like notepad), and 2. a rich text editor (not HTML format but RTF format). When the user edits the contents of the multi-line textbox and uses ribbon options, at any time, I need to obtain the ".text" property and get the literal text without all the RTF markup, and if I simultaneously obtain the ".rtf" property, then I get all the text with the embedded rtf format.
I am not an expert in this area, so perhaps my expectation is beyond reality. However, I am extending a vb6-COM based application with a "com-interop" call out to my .NET library using Telerik controls. This vb6-COM based application contains a control that functions exactly as above, and I want to reproduce that in my .NET application extension so that I can allow editing of those memos (they are stored in sql as varchar(max)); each of those memo fields in the application database contain two fields "mymemofieldRTF" and "mymemofieldTEXT", and when a user edits one of those memo fields in the vb6-COM based app, the app updates both the "...RTF" and "...TEXT" fields in the database. When I view the "...RTF" field in the database, it starts with something that looks like:
I want to mimic this process in my app, and so I am hoping the WinForm RichTextBox will support this or allow me to extend the class with some relatively simple settings or overrides.
Thanks!
Larry Brindise
I am not an expert in this area, so perhaps my expectation is beyond reality. However, I am extending a vb6-COM based application with a "com-interop" call out to my .NET library using Telerik controls. This vb6-COM based application contains a control that functions exactly as above, and I want to reproduce that in my .NET application extension so that I can allow editing of those memos (they are stored in sql as varchar(max)); each of those memo fields in the application database contain two fields "mymemofieldRTF" and "mymemofieldTEXT", and when a user edits one of those memo fields in the vb6-COM based app, the app updates both the "...RTF" and "...TEXT" fields in the database. When I view the "...RTF" field in the database, it starts with something that looks like:
{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 MS Sans Serif;}} \viewkind4\uc1\pard\f0\fs17
The "...TEXT" version has only raw text as you might find if you edited simply in notepad.I want to mimic this process in my app, and so I am hoping the WinForm RichTextBox will support this or allow me to extend the class with some relatively simple settings or overrides.
Thanks!
Larry Brindise