views:

1232

answers:

4

I have been extending the RichTextBox control in VS2008 using C# (adding printer support and URL links). I have most of the functionality I need but the control is not that good. I do not know how to change the mouse cursor for image sizing handles. Bullets get out of wack with the size and colour. I need this for winforms not asp.net or wpf. I prefer rtf to html wysiwyg editors.

Most of the richtextbox replacements are either too old .NET 1.0/1.1, too simple or way too complex and expensive.

I am using Infragistics control libraries and their closest control to the richtextbox does not quite provide all the functionality I want. They do supply a spell checking control which works with both their text based controls and std winforms textbox and richtextbox. It will work with any control that implements the IProvideTextBox or ISupportSpellChecking interfaces. Unfortunately most of the functionally richtextbox replacements provide their own spelling checking addon controls which do not support either IProvideTextBox or ISupportSpellChecking. I want to distibute 1 std dictionary to users with my application not multiple one which need to be kept some how in synch.

The other thing is the richtextbox just comes as an unadorned control. You need to add your own menu controls and wire things up yourself. Most of the expensive replacments provide a tool bar ready wired up. This is nice but if one is developing a consistant look and feel to all ones applications having to drop a vendors tool bar makes this difficult as one now has this odd set of menu buttons that look and behave differently to the rest of my UI. Also I am using an application styler to skin my aplications. Third party menu controls are unlikely to accomodate this sort of styling.

Can anyone suggest a reasonable RichTextBox control replace that I could use that won't cost the earth, works in winforms, supports RTF and is robust with proper mouse over transitions for image sizing handles and with reliable bullet support.

My current option is scale back my efforts and remove support for the features that just don't cut it but will still leave me with something that is usable.

+1  A: 

We use the DevExpress Rich Text Editor here are we are very satisfied. The price is not high and the support is incredible.

The editor is also embeddable inside their grid, should you want to buy the whole package.

By adorner, do you mean like the Office 2007 toolbar that pop out over a selected text?

Pierre-Alain Vigeant
Thanks I haved use DevExpress with Delphi. It was ok.The only roblem with their RichtextEditor is you have to buy the whole bunndle of winform controls to get it.I a quite happy with Infragistics except their UltraFormatedTextEditor needs more work to meet my requirments.After the text editor, the next most important control is a good spelling checker. It sounds like the Dev Express text editor may be compatible with the infragistics one. Both claim to work to std winform text controls.Its may be a bit late to switch control libraries after we have invested in Infragistics.
For DevExpress, if you buy the full package, you can get the source code. At this point, if you are interested, you could update the source to implement ISupportSpellChecking and call the devexpress own spellchecking engine. DevExpress allows you to recompile their DLL.
Pierre-Alain Vigeant
+1  A: 

While I don't have extensive experience with RichTextBoxes, I have had great success with the DevExpress control suite in the past (much, much nicer than Infragistics, IMHO). I also know that they released a brand new RTF editor in the past few months, so I would definitely give that a look.

Adam Robinson
A: 

I'm using the ScintillaNet, but it also in some way (very) complex.

Oliver
This looks realy good for a source code editor. I don't think it is suitable for a richtextbox replacement. I could be wrong but that s the impression I got. I think it would be very useful for other application development work like a script editor.
A: 

You could always try the Microsoft Inkedit Control provided you've got an OS that supports it (I had issues with 64bit WS2008, and Windows XP, but the rest were fine).

InkEdit inherits from RichTextBox so you can:

        private System.Windows.Forms.RichTextBox richTextBox3;
        try
        {
            this.richTextBox3 = new Microsoft.Ink.InkEdit();
            Microsoft.Ink.InkEdit ie = (Microsoft.Ink.InkEdit)richTextBox3;
            // disable tablet-style ink mode
            ie.InkMode = Microsoft.Ink.InkMode.Disabled;
        }
        catch
        {
            \\ in case platform does not support inkedit control
            this.richTextBox3 = new RichTextBox();
        }

You will need to add a reference to the Microsoft.Ink.dll which (on my machine) is at:

C:\Program Files\Reference Assemblies\Microsoft\Tablet PC

Unless you want to use this controls ink features, then there probably aren't major benefits in terms as features. But, I have noticed that loading text is much faster for long files (10x +) than the previous RichTextBox and also seems to have smoother scrolling.

This seems to be unadvertised, but Visual Studio 2010 B1 has an updated RichTextBox control also.

pgfearo