Custom Text Edit Control
BlitzMax Forums/MaxGUI Module/Custom Text Edit Control
| ||
Hi All, I've been writing a custom text edit control as a replacement for the standard one. It's not as hard as I imagined it would be. If you have the time could you test out the text area and see if anything stands out as being broken. You can download it here The code for the demo (minus the actual text edit gadget code: |
| ||
Does this use any Win32 specific code, besides the gui module? I'm just wondering if this can be used on Mac and Linux too. -Garrett |
| ||
yeah, I've been doing the same thing... competition is always healthy I guess. |
| ||
Does this use any Win32 specific code, besides the gui module? I'm just wondering if this can be used on Mac and Linux too. No Win32 jiggery pokery, it's just a canvas with text display code, so it should work just as well on all platforms I suppose. yeah, I've been doing the same thing... competition is always healthy I guess. I'd be interested in trying a demo of your one when you've done! :) I've been messing with this one for a couple of days and so far I'm happy with how it's turning out. Once I'm finished, I'll be releasing the code for all to play with and improve. ToDO: Scrollbars, Colors, Formatting, Tidy up interface code.. |
| ||
Looks great! Dont forget syntax colors and clipboard support :D |
| ||
^+1 This seems to be fast code (tm)! |
| ||
I'd be interested in trying a demo of your one when you've done! :) sure, I could upload one tomorrow. I'm a little further along then you are right now, per your demo anyway. |
| ||
sure, I could upload one tomorrow. I'm a little further along then you are right now, per your demo anyway. Sounds good. It'll be nice to have something to aspire to. |
| ||
here is the demo... copy and paste are in but right now they are mapped to f1 and f2. I incbined MS's consola font so if you get the default then, that didn't work. there are some bugs... the biggest is x cursor positioning offscreen is not right. the other is there is a slow down when changing the scroll position at first but it goes away after drawing about 2 screens. the included file is over 3300 lines... I've tested it on files over 30,000 and the performance (on my machine at least is still the same) download oh yeah.... the folding is not complete yet... (I don't fobid the editing of the title line) |
| ||
Hi Dmaz, Thanks for that. There are some issues I found. If you change your location with the mouse scroll wheel then move the cursor with the arrow keys, then it redraws the wrong stuff on screen. Highlighting also goes a bit screwy at times and it doesn't delete chunks you have highlighted. It's much better than my one on other areas though (scroll bars for instance) and folding etc. Thanks for the demo, it will be interesting to see how they both develop. |
| ||
If you change your location with the mouse scroll wheel then move the cursor with the arrow keys, then it redraws the wrong stuff on screen. that's odd, that didn't do that until just recently, darn! [edit]yeah that was a last minute change with a dumb oversight on my part, now fixed[/edit] Highlighting also goes a bit screwy at times and it doesn't delete chunks you have highlighted. yeah, I haven't spent much time on that yet. thanks for the feedback... Have you made any more progress? |
| ||
Not much. I put the scrollbars in, but there is a chunk of 'Hack like' code in there for checking the bounds of the on screen text which I'm not too happy with, so I'll want to change that before I do another test. |