Microsoft KB Archive/98436

= How to Create a Default Text Button on an Input Screen =

PSS ID Number: 98436

Article Last Modified on 10/23/1999

-

The information in this article applies to:


 * Microsoft FoxBASE+ for Macintosh 2.01

-



This article was previously published under Q98436



SUMMARY
The code example below demonstrates how to create a default text button on an input screen. For example, you may want the OK button to be chosen by default when the ENTER key is pressed.



MORE INFORMATION
To create a default text button:

 Place the text button(s) on the .SCX screen. Draw a thicker outline around the button that is to be the default button. (This gives the appearance of a default button, but does not actually make this the default button. The ON KEY command is what controls the action of the &quot;default&quot; button.) Generate the .SCX screen into a format file.  Open the .FMT file as a program and enter code above and below the generated screen code so that it resembles the following: CLEAR SET PROCEDURE TO  STORE 0 TO mchoice SET TALK OFF SET CONFIRM OFF ON KEY = 13 DO veri   && This is the carriage return trap. STORE 1 TO a  STORE &quot;This is z&quot; TO z

********Begin: generated screen code ****************** SCREEN 1 TYPE 0 HEADING &quot;Screen 1&quot; AT 40,2 SIZE 286,492 PIXELS ; FONT &quot;Geneva&quot;,12 COLOR 0,0,0,-1,-1,-1 @ PIXELS 78,312 TO 112,392 STYLE 28479 COLOR 0,0,0,-1,-1,-1 @ PIXELS 83,317 GET mchoice STYLE 1 FONT &quot;Chicago&quot;,12 ; PICTURE &quot;@*V OK;Cancel&quot; SIZE 2072,70 COLOR 0,0,0,-1,-1,-1 @ PIXELS 76,46 GET a STYLE 0 FONT &quot;Geneva&quot;,12 SIZE 15,113 ; COLOR 0,0,0,-1,-1,-1 @ PIXELS 117,47 GET z STYLE 0 FONT &quot;Geneva&quot;,12 SIZE 15,173 ; COLOR 0,0,0,-1,-1,-1 ********End: generated screen code **********************

READ

PROCEDURE veri ALERT NOTE 2 &quot;I'm here in the default button action.&quot; KEYBOARD CHR(23)  && This terminates the READ. RETURN .T.                       

Additional query words: foxbase+/mac 2.01

Keywords: KB98436

Technology: kbAudDeveloper kbFoxBASE201Mac kbFoxBASESearch kbFoxproSearch kbHWMAC kbOSMAC

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.