Octavian Rasnita wrote:
I need to use -dialogui option for a window in order to make it accessible
with the keyboard, but after doing this, I have a problem with multiline
Textfield boxes.
If I use that option, when pressing enter to put an end-of-line in the
multiline textfield, nothing happends.
The cursor remains where it was before pressing enter, and no new line is
created.
-pushstyle => ES_WANTRETURN,
If I remove the -dialogui option of the window in which that textfield is
located, the textfield works fine.
I have discovered that if I use the -dialogui option and I press
Control+Enter instead of just enter, the program works as it should
(although that I don't know if a correct \r\n end of line is inserted, or
something more than that).
Is there a way to be able to use -dialogui option and to be able to create
new lines in the textfield by pressing just enter?
By default if you use -dialogui, then the <Enter> key is 'reserved' for
the default button action (-ok => 1 in the button's constructor). You
can change the behaviour for multiline Textfields and RichEdit contols
by adding the ES_WANTRETURN style to their constructors.
Regards,
Rob.