4D v14.3

OBJECT SET TITLE

Home

 
4D v14.3
OBJECT SET TITLE

OBJECT SET TITLE 


 

OBJECT SET TITLE ( {* ;} object ; title ) 
Parameter Type   Description
Operator in If specified, object is an Object Name (String) If omitted, object is a Variable
object  Form object in Object Name (if * is specified), or Variable (if * is omitted)
title  String in New title for the object

The OBJECT SET TITLE command changes the title of the object(s) specified by object to the value you pass in title.

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.

OBJECT SET TITLE can be applied to any simple objects that display a title:

  • buttons and 3D buttons,
  • check boxes and 3D check boxes,
  • radio buttons and 3D radio buttons,
  • listbox headers,
  • static text areas,
  • group boxes.

Usually, you will apply this command to one object at a time. The object title area must be big enough to hold the text; otherwise, the text is truncated.

Do not use carriage returns in title.

If you want to set a title on more than one line, use the "\" character ("\\" in the code editor) as a line return. This is permitted for 3D buttons, 3D check boxes, 3D radio buttons and list box headers.

Note: Pass "\\\" when you want to use the "\" character in the title.

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
       OBJECT SET TITLE(bDelete;" Delete")
       OBJECT SET ENABLED(bDelete;False)
    :(Records in selection([People])=1) // One person found
       OBJECT SET TITLE(bDelete;"Delete Person")
       OBJECT SET ENABLED(bDelete;True)
    :(Records in selection([People])>1) // Many people found
       OBJECT SET TITLE(bDelete;"Delete People")
       OBJECT SET ENABLED(bDelete;True)
 End case

You want to insert titles on two lines:

 OBJECT SET TITLE(*;"header1";"Ascending sort \\\ \\Descending sort")
 OBJECT SET TITLE(*;"button1";"Click here \\to print")

 
PROPERTIES 

Product: 4D
Theme: Objects (Forms)
Number: 194

 
HISTORY 

Modified: 4D v6
Renamed: 4D v12

 
SEE ALSO 

DISABLE BUTTON
ENABLE BUTTON
OBJECT Get title

 
ARTICLE USAGE

4D Language Reference ( 4D v12.4)
4D Language Reference ( 4D v14 R3)
4D Language Reference ( 4D v14 R2)
4D Language Reference ( 4D v13.5)
4D Language Reference ( 4D v14.3)
4D Language Reference ( 4D v14 R4)

Inherited from : BUTTON TEXT ( 4D v11 SQL Release 6)