SHOW GET Command

Included for backward compatibility. Use the Refresh method to redisplay a control after changing the control's properties.

This command is undocumented in the original VFP9 help file,
but the following documentation was found in the FoxPro for Windows 2.6 help, and may still be valid:

Redisplays the @ ... GET object that represents the specified memory variable.

	[, expN1 [PROMPT expC]]
	[LEVEL expN2]
	| COLOR color pair list]


 var is the memory variable, array element or field specified when the control was created.

 In the following example, three radio buttons with the prompts Apples, Oranges and Lemons are created. In this example, var is a memory variable named FRUIT that initializes the radio buttons (since FRUIT equals 2, the second button is initially selected). The button number is stored to FRUIT when you choose a button.

 STORE 2 TO fruit
 @ 4,2 GET fruit PICTURE '@*R Apples;Oranges;Lemons'

 expN1 is the number of the button you want to redisplay within a set of invisible, radio, or push buttons. A button's number is determined by the order in which the button prompts are created. In the example above, Apples is created first and is button number one. The second button created is Oranges; it is button number two. The last button, Lemons, is button three.

 The following program creates the same buttons as in the previous example. However, when one of the radio buttons is chosen, the NOORANGE VALID routine is executed. The routine disables the Oranges button with SHOW GET and DISABLE.

 STORE 2 TO fruit
 @ 4,2 GET fruit PICTURE '@*R Apples;Oranges;Lemons' VALID noorange()

 FUNCTION noorange
 SHOW GET fruit,2 DISABLE && Disables the second button
 _CUROBJ = 1

 You can replace the prompt for an individual push button, radio button or check box with another prompt by including PROMPT expC. expC replaces the original button or check box prompt. You can also change the button or check box attributes (which determine whether the control is enabled or disabled, what hot keys are assigned, and whether it is the default or Esc choice) by specifying the appropriate special characters with expC.
 SHOW GET is typically placed in a VALID routine for the check box, push button or radio button. 

 In the following example, a check box is created. When the check box is chosen, the VALID clause routine Newprompt is executed. The routine changes the check box prompt and the hot key.

 STORE 1 TO check
 @ 4,2 GET check FUNCTION '*C \<Checked' SIZE 1,13 VALID NEWPROMPT()

 FUNCTION newprompt
 IF check = 0
  SHOW GET check,1 PROMPT '\<Unchecked'
  SHOW GET check,1 PROMPT '\<Checked'

 In FoxPro for Windows and FoxPro for Macintosh, you can use PROMPT to specify picture files that are displayed on a picture check box, push button or radio button when it is enabled, selected and disabled. The PROMPT clause is ignored if picture files are specified in the PROMPT clause in FoxPro for MS-DOS.

 In FoxPro for Windows, the picture file can be a bitmap file with a .BMP extension. In FoxPro for Macintosh, you can use a picture file of PICT type or a .BMP bitmap file.

 Include a set of up to three picture files separated by commas in expC. The first picture file is displayed on the picture check box, push button or radio button when it is enabled. The second picture file is displayed when the picture check box, push button or radio button is selected. The third picture file is displayed when the picture check box, push button or radio button is disabled.

 Including ENABLE allows the specified control to be selected or chosen. Including DISABLE prevents the control from being selected or chosen and displays the control in disabled colors.

 You can nest READs by issuing @ ... GET and a READ in a routine called in an active READ. READs can be nested to five levels.

 If you don't include a LEVEL clause, SHOW GET defaults to the current READ level. Include a LEVEL clause to redisplay a control on a level other than the current level. The numeric expression expN2 can assume the value 1, 2, 3, 4 or 5, corresponding to the READ level of the control to redisplay. Use RDLEVEL() to return the current READ level.

COLOR SCHEME expN3 | COLOR color pair list
 Controls can be redisplayed in the colors you specify. You can specify a color scheme or a color pair list. For more information about control colors, see @ ... GET and @ ... EDIT - Text Edit Regions.

Expand imageRemarks

Expand imageSee Also

© , 1996-2020 • Updated: 11/10/20
Comment or report problem with topic