Quantcast
Channel: Library Questions - Processing 2.x and 3.x Forum
Viewing all articles
Browse latest Browse all 2896

G4P not gaining focus after invisible

$
0
0

Hi, I have a sketch that periodically asks the user for some simple text input via a GTextField (actually multiple fields and GTabManager). There is no mouse used in the application so I am relying on the setVisible and setFocus methods to render the text field when it is needed.

The problem is that if the field starts out invisible and then is made visible it does not have focus, ie the caret is not visible or blinking. I have confirmed that the "GETS_FOCUS" event is fired when setFocus is set to true. The only way to 'activate' the field is to click with the mouse (unwanted). When the field is not in use I have setVisible, setEnabled and setFocus all false, and set them true when user input is required.

Am I using the right approach or is this a bug?

Thanks!

Processing 3.3.5, default renderer.


Viewing all articles
Browse latest Browse all 2896

Trending Articles