Sample Procedure to Insert Spaces when TAB Key is PressedLast reviewed: June 27, 1995Article ID: Q128632 |
The information in this article applies to:
SUMMARYBelow is a procedure demonstrating how to, within a program, insert spaces when the TAB key is pressed.
MORE INFORMATIONIn the SETUP Code of your Screen, OR WHEN clause of an @ ... EDIT, or before a MODIFY MEMO or MODIFY FILE, add the following line to allow access to the program:
ON KEY LABEL TAB DO EMULTABBelow is the contents of EMULTAB.PRG:
DEFINE WINDOW NEWTAB FROM 1,1 TO 5,22 && Setup a Window MOVE WINDOW NEWTAB CENTER ACTIVATE WINDOW NEWTAB PUBLIC NUMTAB NUMTAB = 4 && Give a default of 4 Spaces @1,2 SAY "How Many Spaces?" @2,2 GET NUMTAB READ RELEASE WINDOW NEWTAB SET PROCEDURE TO EMULTAB ON KEY LABEL TAB DO TABEVAL WITH NUMTAB IN EMULTAB KEYBOARD '{TAB}' PROCEDURE TABEVAL PARAMETERS TABSIZE FOR i=1 TO TABSIZE KEYBOARD '{SPACEBAR}' NEXT ON KEY LABEL TAB DO EMULTAB RETURNCAUTION: The default TAB functionality will be gone until the following command is entered:
ON KEY LABEL TABThis is sample code. You may modify it to suit your requirements.
|
Additional reference words: FoxWin 2.50 2.50a 2.50b 2.60 2.60a
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |