0 Votes

Field Properties dialog

Last modified by WikiBot on 2025/03/20 14:16

Field Properties dialog

The Field Properties dialog is used to change the graphical attributes of the selected field.

The dialog allows selection of

  • The target, i.e., the data object shown in the field
  • Text style (font, size, color)
  • Presentation format (primarily for numerical fields). The advanced format may be either a Lisp format string or a function name preceded by "=". The format is used only when the field accepts strings but the attribute value is not a string.
  • Read-only option
  • Text strings associated with the field (label, help message, error message, etc.)
  • For controls, a command to be executed when a value is assigned to the field
  • For buttons, a command to be executed when the user clicks the button (see scripts)

To edit more properties, click the Advanced button. Here are the advanced field properties (see also Advanced properties for other graphical properties):

  
:get A user-supplied function or script that calculates the field value from the attribute value. The function is called with one argument, the attribute value and should return one or two results. The first one is the value to be shown in the field, the second one may be a list (key value ...) with additional arguments for the dialog item that implements the field
The get script is called with field's variable as root and with variables _value, _pane, and _field. It returns the value to be shown in the field.
:put a user-supplied function or script that takes the field's value and saves it to the attribute value. The function is called with two arguments, the field's variable and the field's value. It should check the value and if it is valid save it and return non-nil.
The put script is called with field's variable as root and with variables _value, _old (old field's value), _pane, _widget, and _field.
:factor A number or a reference to a numerical parameter that scales the field value for presentation (e.g., converts to different measurement units).
:type The Lisp type of accepted field values. Normally the type is not needed because the types of attributes are known.
:edf Edit Format. Tells how the user may change the presentation format of field values. The options are :no – the user cannot change the format; :numeric – the user may change the numerical format; :user – the user may edit only the advanced format; a string – use the string as a format string, the user cannot change it.
:icon The picture displayed to the left of the button's label. The property value should be either one of standard pictograms, a pictogram defined in application, or a filename containing a bitmap (.bmp) or icon (.ico). Some standard icons (used in the toolbar) are "ok.bmp", "cancel.bmp", "opnobj.bmp", "edit.bmp", "start.bmp", "ida.bmp", "navigate.bmp", "simdata.bmp".
:colors Additional colors to be used instead of those defined in the icon. The colors may depend on the parameters of the data object. See Controls for more information.
:alt The text to be shown in case if the value is missing. May be either a string or a script to be applied to the field's variable.
:show-irrelevant 

Controls how an irrelevant value is shown in this field. Possible values:

  
NIL the relevancy is not shown;
T irrelevant value is shown as "n.a." (not applicable) or a corresponding expression in the current language (this is default action for fields that show input data);
a string irrelevant value replaced with this string;
a symbol irrelevant value replaced with the translation of this symbol in the dictionary (topic *object-values*)
:widget Specifies the dialog item class that implements the fields. Some widgets may require extra advanced properties
:args List (ref1 ... ) of references to additional attributes required to calculate the field value. References are relative to the field's variable. The field will be refreshed every time some of these attributes is changed.
:linkable :True enables and :False disables support of parameter mapping in this field.

See also:

Element Properties dialog

Field properties

Field Properties dialog