[Project_owners] Override VK_RETURN behaviour in a textbox?

Neil neil at parkwaycc.co.uk
Tue Jun 7 10:19:04 EDT 2005

David Murray wrote:

> Basically I have a multiline textbox, which the user enters text in, 
> then when they press enter (VK_RETURN), a command is called and the 
> textbox is cleared. However, if they press shift+enter or whatever, it 
> *shouldn't* be called, and a normal newline should appear. It seems 
> that all the <key> things are ignored if a multiline textbox has focus 
> - anybody know how to get around this?

You'll have to add your own keypress handler which prevents the textbox 
from acting on the keypress and calls the command directly.

More information about the Project_owners mailing list