Saltar para o conteúdo principal
Versão: v20 R3 BETA

Objectos formulário

You build and customize your application forms by manipulating the objects on them. You can add objects, reposition objects, set object properties, enforce business rules by specifying data entry constraints, or write object methods that run automatically when the object is used.

Objectos activos e estáticos

4D forms support a large number of built-in active and static objects:

  • active objects perform a database task or an interface function. Os campos são objetos ativos. Other active objects — enterable objects (variables), combo boxes, drop-down lists, picture buttons, and so on — store data temporarily in memory or perform some action such as opening a dialog box, printing a report, or starting a background process.
  • static objects are generally used for setting the appearance of the form and its labels as well as for the graphic interface. Static objects do not have associated variables like active objects. No entanto, é possível inserir objetos dinâmicos em objetos estáticos.

Manipulação de objectos de formulário

Pode adicionar ou modificar objetos de formulários 4D das seguintes formas:

  • Form Editor: Drag an object from the Form Editor toolbar onto the form. Em seguida, use a Lista de propriedades para especificar as propriedades do objeto.

  • 4D language: Commands from the Objects (Forms) theme such as OBJECT DUPLICATE or OBJECT SET FONT STYLE allow to create and define form objects.

  • Editor de formulários: arraste um objeto da barra de ferramentas do editor de formulários ao formulário. Use the type property to define the object type, then set its available properties. Example for a button object:

"type": "button",
"style": "bevel",
"text": "OK",
"action": "Cancel",
"left": 60,
"top": 160,
"width": 100,
"height": 20