KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Reliable way to procedurally modify object properties
PRODUCT: 4D | VERSION: 2003.3 | PLATFORM: Mac & Win
Published On: April 29, 2004

Compatibility: Version 6.8.x and 2003.x

4th Dimension provides several commands to enable you to change the appearance and behavior of the objects while using the forms in the User or Custom menus environment. The commands accept both variable and object name as a parameter to the target object. If you want to affect several objects at the same time, you will need to use a combination of an object name and the '@' character. This will affect all objects whose names match the name combination. If you want to affect only one object at a time you can use either an object name or a variable name.

Examples

1. The following example sets the font for an enterable object using the name of the associated variable:

FONT (vtName; "Arial")

2. The following example sets the font for an enterable object using the name of the object:

FONT (*;"fName"; "Arial")

Since the object command requires that the name of the object is passed as a string (apply only to object name), you can also use '@' to allow multiple objects to be manipulated with one execution.

Example

FONT (*;"@Name"; "Arial")

Note: The above execution sets the font for any object whose name ends with the word "Name".

Caution: 4D doesn't support a use of multiple objects within a form that share the same variable.

Click here for more information regarding the commands and topics for Object Properties