Menu

#3 Multi-line Text Area Control

open
nobody
5
2001-08-26
2001-08-26
No

I began work on this task, and I would be happy to
share the code that I have completed so far.

However I don't have time to finish it :(

The addition required adding a new function to the key
board input interface.

This function should be called in Inject after a key
board event has been recieved.

This function should return KEY_NORMAL, KEY_CANCEL, or
KEY_ACCEPT.

If KEY_NORMAL, the key event should be sent to the
Control.

If KEY_ACCEPT, the Control's key board input should be
canceled with an "Okay" state.

If KEY_CANCEL, the Control's key board input should be
canceled with a "Cancel" state.

This function should replace the code in Inject where
it is currently forcing Controls to "accept" on Enter,
and to "cancel" on Tab and Escape.

Once that is done, the old TextEdit control will need
to implement this function, and the new TextArea
control will need to as well.

That's the easy part :)

The rest involves:

* making text properly wrap in the TextArea (I have
some code to do this, but its nearly the same as the
StaticText control -- just add support for line
breaks).
* properly locating the cursor when the mouse is
clicked
* determining where to place the cursor when the user
presses the up arrow (and page up)
* determining where to place the cursor when the user
presses the down arrow (and page down)
* adding ScrollUp() and ScrollDown() methods which can
be used by a Scroller control in a user plugin
* text selection would also be very nice

If you'd like to see the code I have completed, send
me an email.

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.