I had to write an editor for a project I'm working on, and I figured since it was already done and enough of it was a PITA to run down (for me anyhow) I might as well post the project here if anyone has a use for it.
Features:
- File load/save (didn't need this but added just for forum folks )
- Keeps track of whether you've saved since changing text
- Font control
- Size control
- Indent/outdent
- Undo
- Left/Center/Right alignment
- Toolbar auto-updates when cursor position moves
- System fonts are read and their short names extracted into a combobox at runtime
- Pretty heavily commented
Notes:
- No printing, sorry, not on my plate, although printing isn't that hard to add to richtextbox apps
- The two comboboxes for font and size appear to be contained by the toolbar, but in fact they are not; I cheated and just placed them carefully. On some systems they might not draw in quite the correct place.
- No try/catch blocks. Wasn't especially on my agenda either, as the version of the editor I'm using doesn't work with files and exceptions are unlikely enough that I don't really care about them at this point.
- It may be that some of my code is very amateurish. Oh well!
Have fun. Dedicated to all those who have helped me tremendously at various times in the past (edneeis, hellswraith, mrpolite and others)