How to activate a string? [SOLVED]

5 posts / 0 new
Last post
alfkil
alfkil's picture
Offline
Last seen: 3 months 1 week ago
Joined: 2011-05-10 22:02
How to activate a string? [SOLVED]

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.

tboeckel
tboeckel's picture
Offline
Last seen: 4 years 5 months ago
Joined: 2011-09-13 12:32
Did you dare to consult the

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...

trixie
trixie's picture
Offline
Last seen: 6 months 3 weeks ago
Joined: 2011-02-03 13:58
Re: How to activate a string? [SOLVED]

@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

alfkil
alfkil's picture
Offline
Last seen: 3 months 1 week ago
Joined: 2011-05-10 22:02
@tboeckel Yes, I forgot to

@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?

alfkil
alfkil's picture
Offline
Last seen: 3 months 1 week ago
Joined: 2011-05-10 22:02
@trixie Thank you, that

@trixie

Thank you, that solved my problem! :)

Log in or register to post comments