Applies to
All controls, menu items, Clipboard.
Description
Returns or sets text values which appear in the control.
Usage
Returns text values from the specified control. List box controls return selected item text, and edit table controls return the active cell contents:
objecttext = Get_Property (objectname, "TEXT")
Set text values for the specified control:
existingprop = Set_Property (objectname, "TEXT", newtext)
Remarks
The TEXT property applies to the control types as described in the table below:
Control Type | Description |
---|---|
CLIPBOARD | The CLIPBOARD object's only property is TEXT. This property represents the Windows clipboard which is used by all applications to cut and paste. If you set the CLIPBOARD's TEXT property, other applications will be able to paste the test that you placed onto the clipboard. |
WINDOW | The window's caption (title). |
STATIC | The displayed text for the static text (label) control. |
GROUPBOX | The text displayed in the upper-left-hand portion of the groupbox's frame. |
PUSHBUTTON | The text displayed on the button. |
PUSHBMP | The text displayed in the status line when the control gets pressed down (see STATUSLINE property). For an example of how to create RADIOBMP controls, see Chapter 7: Controls and Their properties in the Guide to Application Development and the TABBED_TEMPLATE form in the EXAMPLES application. |
CHECKBMP | |
RADIOBMP | |
ICON | The text displayed below (Windows 3.x) or in (Windows '95) the icon. |
CHECKBOX | The text displayed next to the checkbox. |
EDITTABLE | The contents of the current edit table cell which is specified by the SELPOS property. |
EDITFIELD | The contents of the edit line. |
EDITBOX | The contents of the edit box. Multiple lines are delimited with carriage-return/line-feed (\0D0A\ or char(13):char(10)). |
Note: When the EditBox is a RICHEDIT control multiple lines are CR delimited. | |
COMBOBOX | The text appearing in the edit line portion of the combo box. |
LISTBOX | The text of the highlighted item(s) in the list. |
RADIOGROUP | TEXT property for a radio group does nothing. To set or get the current selection in a radio group, use the VALUE property. |
RADIOBUTTON | The text displayed next to the radio button. |
BITMAP | TEXT property for a bitmap does nothing. To display text on a bitmap, set the HELPTEXT property to the desired text and set the DRAWTEXT property to 1 (true). |
TABCONTROL | An @fm-delimited array of tab text. |
See also
TEXTVAL, ACCESSDATA, DEFPROP properties.
Note: If you want to get all of the data within a MultiValued field the correct property that should be used is the ARRAY property. If the TEXT property is used, only the first line of information is retained in the variable and not the entire field.
Example
* this places the current user name on the clipboard Set_Property("CLIPBOARD", "TEXT", @username)