> but it would be nice if I could get it into the official version.
One of the rules for new features is that there should not be more
than minimal costs to existing users who do not want to use the new
feature. This means that there should not be any per-line memory used
unless there is some use of non-uniform tabstops. Also determining
that a line should be laid out with non-uniform tabstops should be
very fast.
Since this is positioning in terms of pixels, it is view-specific,
as each view of a document may use a different magnification factor
and even different styles.
Neil
We are busy moving from the MS RichEditor to the Scintilla editor. One
thing I found that Scintilla doesn’t support the EM_SETLIMITTEXT so there
is no (easy) way of limiting text input.
I already tried to limit input with some notification messages but I can’t
find a proper solution. This is because there looks to be no way to cut
off handling of the notification message e.g. for the SC_MOD_BEFOREINSERT
message.
Am I missing something here? Can anybody point me in the right direction.
Thanks in advantage,
Oh well, it was worth a try. If I try to add it for my own use, could you give me any pointers on the best approach?
> We are busy moving from the MS RichEditor to the Scintilla editor. One
> thing I found that Scintilla doesn’t support the EM_SETLIMITTEXT so there
> is no (easy) way of limiting text input.
Yes, and there are many different operations from paste to drag and
drop that can increase the number of characters.
> I already tried to limit input with some notification messages but I can’t
> find a proper solution.
About the only way to handle this is to intercept all I/O
(keyboard, mouse, ...) using platform calls and only allow through
those that you know will not overflow.
Neil
> Oh well, it was worth a try. If I try to add it for my own use, could
> you give me any pointers on the best approach?
Think about how the document deals with per-line state. You should
put something in Editor::NotifyModified to modify your data structure
as lines are added and deleted.
Neil