Customizing
Version 27 Version 26 39.5.25 39.5.23 39.5.22 39.5.21 39.5.20 39.5.19 39.5.18 39.5.17 German English
Version 27 Version 26 39.5.25 39.5.23 39.5.22 39.5.21 39.5.20 39.5.19 39.5.18 39.5.17 German English

Customize Buttons

Embed Buttons

A context menu entry is embedded in the required data area as a data field DI004336 Button/IronPython. The following parameters with the respective settings are required for buttons:

Parameter

Settings

DF behavior

Defines which object type is to be addressed via the button:

  • c2: Menu item

  • c4: Module/Macro

  • c5: Module subclass

Action ID

Defines which object is to be addressed via the button:

Depending on the DF behavior:

  • Module ID

  • Menu item ID

  • Macro ID

  • Method name from the module subclass

Tooltip

Here the text is entered which is displayed in the tooltip when moving the mouse over the link.

DF height

DF width

Height and width of the button

Symbol ID

The ID of the symbol. Symbols define the properties of the button, e.g. the color

DF heading

Name of the button

If no DF heading is specified, the name of the corresponding object is displayed (module, macro, etc.).

@L variable


Default values

Here you can store an OLE which will be displayed on the button. For this purpose, enter the prefix DBOLE and the number of the OLE object in brackets. Example: DBOLE(001007).

Store Shortcuts on Buttons

It is possible to define key combinations for buttons.

Procedure

  • Enter the letter which is to be contained in the key combination in the Hotkey parameter in the respective data field in the data area in which the button was included.

  • Save.

  • In the user module, the button function can be called using the "ALT+letter" key combination.

Button areas

  • Buttons cannot only be incorporated in a data area, they can also be customized in a separate data area (button area).

  • In this case, the data area consists only of buttons.

  • In the course of this, the following parameters are to be set in the data area:

To Be Considered When Embedding Buttons

  • In PLANTA project, there are various modules in which records of a particular area are inserted and created via buttons (e.g. the New button in the Persons module (009A3Q) in addition to the menu item and context menu.

  • If creation and insertion are to be blocked for the data area referenced by the button, the above mentioned button must be deleted or hidden in addition to the deactivation of the Creation and Insertion parameters.

Extended button configuration (DF configuration)

As of PLANTA Project 27, the appearance of buttons can be individually customized via a JSON configuration in the DF configuration parameter (df_script_settings).

The extended configuration is available for the following DF behaviors:

  • c2, c4, c5: for the DI004336 Button/IronPython data field

  • e2, e4, e5: for link alpha data fields

Parameter of the button configuration

A JSON object with the key ButtonConfiguration is stored in the DF configuration parameter. The following settings are possible:

Parameter

Possible values

Description

type

Primary, Default, Dashed, Text, Link

Display type of the button

size

Default, Large, Small

Size of the button (overwrites DF width/height)

content

Label, Icon, IconLabel

Display: only label, only symbol, or both

danger

true / false

Marks the button as a danger button (red display)

JSON specification

JSON
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "ButtonConfiguration",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "type": {
      "type": "string",
      "enum": ["Primary", "Default", "Dashed", "Text", "Link"],
      "description": "Visual style of the button"
    },
    "size": {
      "type": "string",
      "enum": ["Default", "Large", "Small"],
      "description": "Size of the button"
    },
    "content": {
      "type": "string",
      "enum": ["Label", "Icon", "IconLabel"],
      "description": "Defines whether the button shows text, icon only, or both"
    },
    "danger": {
      "type": "boolean",
      "description": "Whether the button represents a dangerous/destructive action"
    }
  },
  "required": [
    "type",
    "size",
    "content",
    "danger"
  ]
}

Example configuration

The following configuration defines a primary button in standard size with a symbol and tooltip module:

JSON
{
  "ButtonConfiguration": {
    "type": "Primary",
    "size": "Default",
    "content": "IconLabel",
    "danger": false
  },
  "Tooltip": {
    "Module": "009DWF"
  }
}

To be Considered

  • The displayed text comes from the data field itself.

    • For c# behaviors, it is derived from the DF Heading parameter (df_hdg),

    • for e# behaviors, from the field value.

  • The symbole to be displayed is defined via the Default value parameter: DBOLE(XXXXXX) (e.g. DBOLE(001007)).

  • The size setting overrides the values of the DF width and DF height parameters. For new buttons, DF Width and DF Height have no effect.

  • A customizer help dialog is available for the configuration (similar to the chart customizer).