[fxruby-users] TEXTFIELD_ENTER_ONLY doesn't work

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


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


More information about the fxruby-users mailing list