version 6.0 (Modified)
BUTTON TEXT ({*; }object; buttonText)
Parameter | Type | Description | |
* | If specified, object is an Object Name (String) | ||
If omitted, object is a Variable | |||
object | Form Object | Object Name (if * is specified), or | |
Variable (if * is omitted) | |||
buttonText | String | New title for the button |
Description
The BUTTON TEXT command changes the title of the buttons specified by object to the value you pass in buttonText.
If you specify the optional * parameter, you indicate an object name (a string) in object. If you omit the optional * parameter, you indicate a field or a variable in object. In this case, you specify a field or variable reference (field or variable objects only) instead of a string. For more information about object names, see the section Object Properties.
BUTTON TEXT affects only buttons that display text: buttons, check boxes, and radio buttons.
Usually, you will apply this command to one button at a time. The button area must be large enough to accommodate the text; if it is not, the text is truncated. Do not use carriage returns in buttonText.
Example
The following example is the object method of a search button located in the footer area of an output form displayed using MODIFY SELECTION. The method searches a table; depending on the search results, it enables or disables a button labeled bDelete and changes its title:
QUERY ([People]; [People]Name = vName) Case of : (Records in selection ([People]) = 0) ` No people found BUTTON TEXT (bDelete;" Delete") DISABLE BUTTON (bDelete) : (Records in selection ([People]) = 1) ` One person found BUTTON TEXT (bDelete;"Delete Person") ENABLE BUTTON (bDelete) : (Records in selection([People]) > 1) ` Many people found BUTTON TEXT (bDelete;"Delete People") ENABLE BUTTON (bDelete) End case
See Also
DISABLE BUTTON, ENABLE BUTTON.