[fxruby-users] TEXTFIELD_ENTER_ONLY doesn't work

Jannis Pohlmann info at sten-net.de
Mon May 16 19:09:08 EDT 2005


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



More information about the fxruby-users mailing list