This article applies to:
This sample demonstrates how to use a Slide Button and Script Task Events to echo the user's keyboard input to the screen. It is an alternative to using an Echo Client and was developed as a workaround to the known bugs with the Echo Client (BUG: Echo may remain on the screen when it should not be present ).
This sample uses a SlideButton to echo keyboard responses to the display. The auto update feature of the SlideButton enables the display to be updated without having to call the Draw method. The SlideButton's Text property is initially left blank and its BorderWidth is set to 2, which shows where the echo area is located.
Two script task events are used. The first sub-routine, theManualEcho, is called when a keyboard response is made. It concatenates each keypress and sets the result equal to the SlideButton's text property. A handful of special characters or keystrokes are also accounted for including backspace, space, enter, and question mark.
The second sub-routine, ClearTheManualEcho, is called when the Next button is pressed. It logs the final response and then resets the SlideButton Text's property to be a blank string.
There are two Input Masks on Slide1. The Keyboard allows any key to be pressed and has an EndAction: (none). The Max Count is set to 1000. The Button only allows NEXT to be clicked and is set to EndAction: Terminate so that the Slide ends when the NEXT button is clicked.