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 TypeDescription
CLIPBOARDThe 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.
WINDOWThe window's caption (title).
STATICThe displayed text for the static text (label) control.
GROUPBOXThe text displayed in the upper-left-hand portion of the groupbox's frame.
PUSHBUTTONThe text displayed on the button.
PUSHBMPThe 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 
ICONThe text displayed below (Windows 3.x) or in (Windows '95) the icon.
CHECKBOXThe text displayed next to the checkbox.
EDITTABLEThe contents of the current edit table cell which is specified by the SELPOS property.
EDITFIELDThe contents of the edit line.
EDITBOXThe 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.
COMBOBOXThe text appearing in the edit line portion of the combo box.
LISTBOXThe text of the highlighted item(s) in the list.
RADIOGROUPTEXT property for a radio group does nothing. To set or get the current selection in a radio group, use the VALUE property.
RADIOBUTTONThe text displayed next to the radio button.
BITMAPTEXT 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).
TABCONTROLAn @fm-delimited array of tab text.

See also

TEXTVALACCESSDATADEFPROP 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)
  • No labels