I'm looking for a Terribly Simple Text Editor to use in commercial applications. I expect I shall want to modify the code, so would prefer PB. I've tried Borje Hagsten's EDM32 which is impressive but too big. I want feature-poor! No file handling, fixed character fonts only, in fact only a step away from an edit control, though I shall need a simple, clean interface, and stable - I can add my own bugs later! If keyword highlighting and search and replace are included, all the better, but I don't mind adding them.
Announcement
Collapse
No announcement yet.
TSTE anyone?
Collapse
X
-
> in fact only a step away from an edit control....
So superclass an edit control, adding the few additional features or behaviors you want?Michael Mattias
Tal Systems (retired)
Port Washington WI USA
[email protected]
http://www.talsystems.com
-
-
Chris,
Have you looked at the pbnote2.bas in the samples\sdk\pbnote directory?Last edited by Scott Hauser; 20 Feb 2008, 04:07 PM.The most exasperating part of the "rat race" is how often the rats are in the lead!
Comment
-
-
Scott,
Thanks, I had a look but could not see how to use color syntax highlighting.
MM,
Thanks, I'm doing something of the sort with Richedit at the moment. If I don't bump into the TSTE then I can introduce features using code from messrs Hagsten, Marchildon, etc to guide me. Hate adding the dll, though it was good to dump 6,000 lines of code out of my project (modified EDM32).
Comment
-
-
I think you may want to look into using the RichEdit control.
It is very powerful and can control text color using RTF codes.
To make it even better, I would superclass the RichEdit control so you can add your own custom messages or preprocess others.
For example, you can support the WM_SETTEXT message and receive standard ascii text and the convert it on the fly to RTF internally and then using the EM_STREAMIN message pass the text to the control.
Superclassing is a great way to build your own custom controls based on existing controls.
Comment
-
-
Originally posted by Chris Boss View Post... you can support the WM_SETTEXT message and receive standard ascii text and the convert it on the fly to RTF internally and then using the EM_STREAMIN message pass the text to the control.
Comment
-
-
Chris, If you want simple, I have a text editor that looks very similar to notepad, has find/find next, copy/paste with right click, fixed pitch font but nothing fancy. It probably won't handle large amounts of text as is but is
fine for many things.
You can see it in my client writeup demo, under the file>maintenance>File editor.
Comment
-
-
Chris, for another alternative, you might take a look at my website. I have two text editors, both based on rich text. MyEditor has file functions, but NoteKeeper does not. NoteKeeper is just an integrated maintenance program for text files kept in a single folder. It does high light text in its search routines. Anyway, it won't take long to rule it out if its not what you're looking for.
Comment
-
-
Chris, it's not a RT control. It's actually just a textbox control. All done in DDT.
Im sure it could easily be modified.
Charles, DDT Jumpstart is great !Last edited by Fred Buffington; 21 Feb 2008, 02:52 PM.
Comment
-
-
preliminary results with Charles's code are promising - I have stripped out all the input file handling and inserted color keyword code borrowed from Borje Hagsten, it sort of works... oh, the keywords are SQL ones in this code but the comments are PB. Much more to do, and needs the 32 bit RichEdit dll.
**** EDITED - please see later message for source code
Comment
-
-
Nearly there!
After borrowing keyword coloring (for PB Win 7.0 code) and find/replace code from Messrs Hagsten and Christensen, discarding all file handling, spell checking and making most controls unnecessary, moving remaining functions to a right-click menu, I'm left with something approaching my original requirement, but needing refinement.It's still only 600-odd lines of code.
Problems. The caret should become a cursor when it strays outside the client area, and the comment coloring logic doesn't work properly if the comment line is wrapped. The keyword coloring is dreadfully slow and it makes the scrollbar jump around.
Any advice on how to fix these or any other obvious faults will be gratefully received.
Oh, and it compiles with PBWWin 8.04, you will need to import and export text via the clipboard.Last edited by Chris Holbrook; 22 Feb 2008, 01:14 PM. Reason: withdrew code, will repost to source code forum...later
Comment
-
-
Fix the keyword coloring slowness by using a hash table to look up words. This is extremely fast. Also, check how you are parsing the line of text in order to break the line into words/tokens. There may be speed improvements available there.Paul Squires
FireFly Visual Designer (for PowerBASIC Windows 10+)
Version 3 now available.
http://www.planetsquires.com
Comment
-
-
>by using a hash table to look up words.
Or...Binary Search of an array February 14 2000, July 15 2003Michael Mattias
Tal Systems (retired)
Port Washington WI USA
[email protected]
http://www.talsystems.com
Comment
-
Comment