On 12/01/2017 at 04:18, xxxxxxxx wrote:
Cinema 4D Version: R14
Platform: Windows ;
Language(s) : C++ ;
I'm trying to implement a simple "enter" key press in a dialog edit text field. Is this possible!? Can I (or how can I..) test if a dialog gui element has focus in the dialog's Command() or Message()?
An example is the content browser search, which appears to do something similar. You can type but won't search until enter is pressed. I'm trying to do something similar.
On 13/01/2017 at 01:23, xxxxxxxx wrote:
when a gadget of a GeDialog is edited, GeDialog::Command() is called. By implementing GeDialog::Command() you can react to interactions with a certain gadget.
So when a text edit field is changed by pressing the enter key, GeDialog::Command() is called. Then you can check if the Enter key is pressed with GetInputState(). So when the enter is is pressed, you can react accordingly.
You find an example of this in the GeDialog Manual.
On 13/01/2017 at 17:20, xxxxxxxx wrote:
I had tried this before, but it wasn't working. Strangely enough it would print from the Command() id but not read the key press? That's what was confusing me.
I then made some changes to the interface, the edit text field is now in a 'tab' and the user can make as many tabs as they like. But I forgot to update the Command() for the change in id + tab number. In short, I wasn't looking at the right id
Solved! As always, thanks,