Jannis Pohlmann schrieb:
> Hi Lyle,
>
> I noticed that when creating a FXTextField with TEXTFIELD_ENTER_ONLY
> it still sends messages
> to its target when other keys than KEY_Return are pressed.
>
> I usually create a textfield this way:
>
> textfield = FXTextField.new(self, 50, self, ID_INPUT,
> TEXTFIELD_ENTER_ONLY)
> textfield.setText(aStr)
> textfield.setFocus
> textfield.move(x, y, w, h)
> textfield.show
>
> This way only the enter key should send the message
> SEL_KEYPRESSED/SEL_KEYRELEASED with
> ID_INPUT to the target. But that somehow doesn''t work.
>
> Regards,
> Jannis
Oh well, my fault. I just saw that it sends a SEL_COMMAND when
KEY_Return is pressed, not a
SEL_KEYPRESS or SEL_KEYRELEASE. That works fine.
So please ignore the message before.
- Jannis