|
Overview
|
The vbAccelerator RichEdit control is a project which has been under construction at
this site for some time, and here is the first release. This is a highly featured implementation
of the RichEdit control (also called the RichText control under VB) which aims to give you the
control that VB can't give you in RichEdit implementations.
There are a lot of exciting additions
to come for this project over the next few months. Check out the vbAccelerator
RoadMap for RichEdit development for more information!
|
Using RichEdit Controls
|
Before we begin, its worth pointing out that RichEdit controls have more uses than just
for RTF editors. For example, the VB/VBA Object Browser uses a version 2.0 RichEdit to implement
a hyperlinked display in the bottom pane:
And Office makes almost exclusive use of RichEdit controls to implement all text boxes
in its dialogs, presumably because it is easier to internationalise than the standard Edit control.
|
Microsoft's RichEdit Control Versions
|
There are now three versions of the RichEdit control available, depending on the OS version and software
that you have. The features have been gradually improving, as shown in the table below:
|
Version
|
DLL
|
OS Version
|
Notes
|
|
1.0
|
RichEd32.DLL
|
Win95
|
This is the lowest common denominator version of RichEdit, and is the version that the
Microsoft RichText OCX for VB is based on. The code in RichEdit 2 is much improved
compared to this version.
|
|
2.0
|
RichEd20.DLL
|
WinNT 4.0, Installed with MS Office
|
RichEdit 2.0 adds font background colour, hyperlink, multi-level Undo and Transparency
support. This control is much better at reading Office RTF documents
and also has much improved Unicode and asian language support. More Details.
|
|
3.0
|
RichEd20.DLL
|
Win2000. Can also be obtained by installing the Microsoft System Installer (MSI) redistributable
(which I recommend!)
|
RichEdit 3.0 adds zoom in/out, more underline styles, paragraph numbering, simple
table support, suspend Undo/Redo and further improves the Office/multi-lingual facilities.
More Details.
|
|
The vbAccelerator implementation will operate as a version 2.0/3.0 RichEdit control (using RichEd20.DLL).
However, you can set the control to operate using the more limited RichEdit version 1.0
control (which is implemented in RichEd32.DLL). If you do this the methods and properties related to
the new features are still available, but calling them has no effect.
At this point the control has been implemented with version 2.0 feature support. Version 3.0 support will
be added once Win2000 has been released and the documentation for this version has been finalised,
however, since the control is a direct API implementation you will see it is quite easy to access the
new features as shown in the Zoom and Outline samples.
|
Control Features
|
- Supports RichEdit 1.0, 2.0 or 3.0
- View documents with word-wrap or not as well as in WYSIWYG mode.
- Set the background colour of any selection in the control
- Automatic hyperlink detection, and the ability to manually add your own hyperlinks to any portion of text
- Tile a picture into the background of the RichEdit control.
- Full control over keyboard accelerators including the Tab key.
- Hanging indents, line-spacing, paragraph before and after spacing all controllable through code.
- Multi-level Undo and Redo, with naming for the Undo and Redo items
- Force control to be Text-only
- SingleLine and Password support built-in
- Built-in Printer dialog, and control over margins when printing
- Insert text or RTF, or get the selection as text or RTF
An article, Coding with the vbAccelerator RichEdit control, is a available
to describe the main features and their use.
|
Development Roadmap
|
Right now there are a few things the RichEdit control does not support. The
control has an exciting development road-map to provide these features over time.
- RichEdit Print Preview control.
This control will allow you to perform an MFC style preview
- RichEdit Print Multiplexer control.
By virtually splitting a printed page into parts and using multiple RichEdit controls, it is
possible to support complex header and footer arrangements. This control will make it easy
to set up the print out from any RichEdit control.
- An Office 97 Style Ruler Bar
This control will make it easy to see and adjust paragraph tabs and hanging indents for any
RichEdit control.
- RichEdit OLE Support Package
The current RichEdit control does not support bitmaps because this requires the control to
support the IRichEditOLE interface.
|
Documentation
|
Documentation for the vbAccelerator RichEdit control's properties, methods and classes
is available as an RTF. This documentation was
created with the ActiveX Documenter (which itself
uses a variant of the RichEdit control!).
Click here to download/view the vbAccelerator RichEdit control method and event documentation
|
Back to top Back to ActiveX Control Source Code Back to Source Code
|
|
  |