block mode .NEt implementation?

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
madfiddler
Posts: 4
Joined: Tue Jul 19, 2005 11:22 am

block mode .NEt implementation?

Post by madfiddler »

Hi all

this is a sort of textpad related question....

I'm writing a .NET application and need a multi-line text box control which has a "block mode" just like my trusty textpad!

Does anyone know...
1) if there is a "textpad control" which I can use
2) if there are any free controls out there that I could use
3) how to go about programming this in either c# or vb.net to replicate textpads "block mode"?


thanks!
mf
ninjalabs
Posts: 46
Joined: Tue Jan 25, 2005 4:38 pm

Post by ninjalabs »

1. No there isn't.

2. Possibly the editor that comes with http://www.icsharpcode.net/OpenSource/SD/

3. Text entry fields are REALLY complicated - more complicated than you could ever realise just by looking at one or using it. You would have to write a control from scratch to perform block selecting (which is what TextPad have done in effect) using GDI and capturing the key handling events, oh and writing a buffer manager and rendering code from hell.
TextPad redneck since 1999.
NinjaLabs is now CSWD Limited!
madfiddler
Posts: 4
Joined: Tue Jul 19, 2005 11:22 am

ouch

Post by madfiddler »

ninjalabs wrote: 3. Text entry fields are REALLY complicated - more complicated than you could ever realise just by looking at one or using it. You would have to write a control from scratch to perform block selecting (which is what TextPad have done in effect) using GDI and capturing the key handling events, oh and writing a buffer manager and rendering code from hell.

yeah I know....after doing various web searches I started off down this route only to get so far and think "stuff it! there must be a control SOMWHERE that I can use!"

cheers
madfiddler
Posts: 4
Joined: Tue Jul 19, 2005 11:22 am

btw

Post by madfiddler »

fyi ICsharpCode.TextEditor does not appear to have a "block mode" selection mechanism
ninjalabs
Posts: 46
Joined: Tue Jan 25, 2005 4:38 pm

Post by ninjalabs »

Bugger. Perhaps I should write one. I could probably sell it for a few quid.
TextPad redneck since 1999.
NinjaLabs is now CSWD Limited!
madfiddler
Posts: 4
Joined: Tue Jul 19, 2005 11:22 am

scintilla

Post by madfiddler »

Well I started trying to do this myself and just figured it was too blooming hard to get what I tend to think of as "standard functionality"

In the end I came across scintilla www.scintilla.org which did the job, but this is effectively a full text editor and really was much more than I needed.

Maybe I will look at how scintilla does it at some point and replicate this in a .NET control

....yeah I expect you could make a few bob from this!
ninjalabs
Posts: 46
Joined: Tue Jan 25, 2005 4:38 pm

Post by ninjalabs »

Ironically I've just recieved some requirements from a client who need something like this. (damn!)
TextPad redneck since 1999.
NinjaLabs is now CSWD Limited!
Post Reply