This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com

Home

 
4D v20 R7
OBJECT SET FONT

OBJECT SET FONT 


 

OBJECT SET FONT ( {* ;} object ; font ) 
Parameter Type   Description
Operator in If specified, Object is an Object Name (String) If omitted, Object is a Field or a Variable
object  Form object in Object Name (if * is specified), or Field or Variable (if * is omitted)
font  String in Font name

OBJECT SET FONT displays the object using the font specified in the font parameter. The font parameter must contain a valid font name.

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.

Note: If you use this command on an object that was using a style sheet, the reference to the style sheet is automatically deleted from the object -- even if you assign the same attributes as those of the style sheet.

The following example sets the font for a button named bOK:

 OBJECT SET FONT(bOK;"Arial")

The following example sets the font for all the form objects whose name contains "info":

 OBJECT SET FONT(*;"@info@";"Times")

The following example uses the special %password option, designed for entry and display of “password” type fields. When you pass "%password" in the font parameter:

  • every character entered in the object is displayed with the same symbol,
  • "copy" and "cut" actions are disabled in the object.

Note: You can use the %password option with field, variable and combo box type objects.

 OBJECT SET FONT([Users]Password;"%password")



See also 

Font file
FONT LIST
OBJECT Get font
OBJECT SET FONT SIZE
OBJECT SET FONT STYLE
Programming Notes

 
PROPERTIES 

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

 
PAGE CONTENTS 
 
HISTORY 

Modified: 4D v6
Renamed: 4D v12 (FONT)
Modified: 4D v14

 
ARTICLE USAGE

4D Language Reference ( 4D v20 R7)