I am trying to find a way to activate a string gadget (make the cursor go there and be ready for input). So far no luck.
The story is this: I have a console which prints out stuff, and below it a string gadget for input. When the user has typed in stuff and has hit enter, I want to be able to immidiately reactive the string gadget, so the user doesn't have to click it again to enter more text.
Did you dare to consult the AutoDocs already? The required function has a very obvious name: ActivateGadget(). It is even the very first function in the table of contents of the intuition AutoDocs...
@alfkil
What kind of gadget is that exactly? An Intuition string gadget, or a ReAction string gadget? If the latter is the case, is it placed inside a layout? If so, you should use ILayout->ActivateLayoutGadget() to activate the string.
For further reference, string gadget activation is discussed in this thread in the Hyperion forums.
AmigaOne X5000-020 / 2GB RAM / Sapphire Pulse Radeon RX 560 / AmigaOS 4.1 Final Edition Update 2
@tboeckel
Yes, I forgot to say, that I have already tried ActivateGadget(), and it *does* put the cursor in the gadget and it does allow me to enter text, but when I press enter, nothing happens, I don't get a GADGETUP event, and I have to click the gadget with the mouse all over if I want my input to be recognized. Is this a bug, or am I doing something wrong?
@trixie
Thank you, that solved my problem! :)