Page 1 of 1

Activate a text entry widget

Posted: Tue Jan 18, 2022 3:29 pm
by Tipsi
Hi

Is there any way to activate a text entry widget (Textentry class) via the Hollywood script to allow the user to enter text?

For example, I want to prompt the user first for the name, evaluate the input, clear the input in the widget and activate it again for the age prompt.

Griessli
Tipsi

Re: Activate a text entry widget

Posted: Tue Jan 18, 2022 5:05 pm
by SamuraiCrow
Have you considered using a page gadget to switch to an identical text entry gadget? That way the second gadget could validate numbers only instead of trying to do it with one gadget. :idea:

Re: Activate a text entry widget

Posted: Tue Jan 18, 2022 10:24 pm
by mrupp
Use the ActiveObject attribute of the Window class. Setting ActiveObject will activate the widget specified.

Re: Activate a text entry widget

Posted: Wed Jan 19, 2022 12:08 am
by Tipsi
@mrupp
Yes, that is exactly what I was looking for. Thanks.

@SamuraiCrow
Thanks for your tip about the second field for numbers. I will include that (without the page) as well.

Griessli
Tipsi