Skip to main content
Version: 7.0

DESIGN statement

The DESIGN statement changes form design.

Syntax

The syntax consists of nested blocks of design statements. The outer block, beginning with the keyword DESIGN, defines a form whose design will change:

DESIGN formName [caption] [CUSTOM] {
designStatement1
...
designStatementN
}

Each designStatement describes one design statement. Design statements are of the following types:

NEW name [insertPos] [{...}];
MOVE selector [insertPos] [{...}];
selector [{...}];
REMOVE selector;
propertyName = value;

The first three statements – create (NEW), move (MOVE), and modify – may in turn contain nested blocks of design statements. The design statements remove (REMOVE) and change property value (=) are simple single statements. Each design statement must end with a semicolon if it does not contain a nested statement block.

Each selector can be one of the following types:

componentName
PROPERTY(formPropertyName)
FILTER(filterName)
FILTERGROUP(filterGroupName)
PARENT(selector)
GROUP([propertyGroupSelector][,groupObjectTreeSelector])
noGroupObjectTreeContainerType
groupObjectTreeContainerType(groupObjectTreeSelector)

In turn, groupObjectTreeSelector can be one of two types:

groupObjectSelector
TREE treeSelector

Description

Using the DESIGN statement the developer can manage the design of the interactive form view by creating, moving, and deleting containers and components, as well as changing their certain properties. By default, a default design is created for each form, along with appropriate containers. If necessary, you can recreate the design without the default containers and previously configured settings. This is done using the keyword CUSTOM.

Each block of design statements enclosed in braces alows to modify a particular component and its descendants. Let's call this component the current component or the current container if we know that the component should be a container in our case. In the external block following the DESIGN keyword, the main container is the current component. There are the following design statements:

  • The create statement (NEW) allows to create a new container, making it a descendant of the current one. The newly-created container will be the current component in the design statements block contained in this statement.
  • The move statement (MOVE) allows to make an existing component a direct descendant of the current container. This component is first removed from the previous parent container. The component being moved becomes the current component in the design statements block contained in this statement.
  • The modify statement allows to modify the specified component which must be a descendant (not necessarily a child) of the current container. The specified element will be the current component in the design statements block contained in this statement.
  • The remove statement (REMOVE) allows to remove a specified component from the component hierarchy. The component to be removed has to be a descendant of the current container.
  • The change property value statement (=) allows to change the value of the specified property of the current component.

The component hierarchy described in this statement can have an arbitrary number of nesting levels and describe any number of components and their properties at each level.

To access design components, you can use their names or address property components on the form (PROPERTY), the parent component (PARENT), property group components (GROUP), and other base components/default design components. A property component created by a predefined object operator is addressed by the operator name with its object mapping, for example PROPERTY(NEW(o)), PROPERTY(NEW[Order](o)), PROPERTY(EDIT(o)), or PROPERTY(DELETE(o)), unless the property was given an explicit name on the form.

Parameters

Common parameters

  • formName

    The name of the form being changed. Composite ID.

  • caption

    The new form caption in the interactive view mode. String literal. The form caption doesn't change in the navigator.

  • name

    The name of the container being created. Simple ID.

  • insertPos

    Specifying the insertion position of the component. It can be specified in one of the following ways:

    • BEFORE selector

    • AFTER selector

      Specifying that the component must be added or moved just before (keyword BEFORE) or after (keyword AFTER) the specified component. The specified component must be a child of the current container.

    • FIRST

      Keyword indicating that the component should be added or moved to the beginning of the list of child components of the current container.

    • LAST

      Keyword indicating that the component should be added or moved to the end of the list of child components of the current container. Unlike default addition, components inserted using LAST will always be positioned after all components added in the order of insertion.

    • DEFAULT

      Keyword indicating that the component should be added or moved in the order of insertion to the list of child components of the current container. This is the default value.

  • propertyName

    The name of the component property. The list of existing properties is provided in the tables below.

  • value

    The value assigned to the corresponding container property. Acceptable value types are provided in the tables below.

Component properties

Property nameDescriptionValue typeDefault valueExamples
spanNumber of line cells the component occupies in a container laid out in several lines (or as a grid)Integer literal12
defaultComponentSpecifying that this component should get the focus when the form is initialized. Can only be set for one component on the entire formExtended Logical literalFALSETRUE
FALSE
activatedMarks the component (a tab page) as the one initially selected in its tabbed container when the form opensLogical literalFALSETRUE
FALSE
fillSimilar to the flex property, the only difference being that if a zero value is set, the align property is set to START, otherwise align is set to STRETCHNUMERIC type literal01.5
sizeThe base component size in pixels (a value of -1 means that the size is undefined)A pair of integer literals (width, height)(-1, -1)(100, 20)
heightThe base component height in pixels.Integer literal-150
widthThe base component width in pixels.Integer literal-120
flexExtension coefficient. Value of a property similar to the CSS flex-grow property. Defines how much the component should grow in size relative to other components.NUMERIC type literal00.25
shrinkAllows the component to shrink below its base size along the container's main direction (similar to CSS flex-shrink)Logical literalFALSETRUE
FALSE
alignShrinkAllows the component to shrink below its base size along the cross (alignment) directionLogical literalFALSETRUE
FALSE
align
alignment
Component alignment inside the container. Acceptable values: START (at the beginning), CENTER (in the center), END (at the end), STRETCH (stretched).Alignment typeSTARTSTRETCH
alignCaptionWhen the container aligns captions (alignCaptions), draws this component's caption in the shared caption columnLogical literalFALSETRUE
FALSE
overflowHorzBehavior when the content exceeds the component width: auto (scroll if needed), clip, or visible (CSS overflow-x)String literalautoclip
visible
auto
overflowVertBehavior when the content exceeds the component height: auto (scroll if needed), clip, or visible (CSS overflow-y)String literalautoclip
visible
auto
marginTopTop marginInteger literal03
marginBottomBottom marginInteger literal04
marginLeftLeft marginInteger literal01
marginRightRight marginInteger literal01
marginMargin. Sets the same value to the following properties: marginTop, marginRight, marginBottom, marginLeftInteger literal05
captionFontThe font to be used for displaying caption of the componentString literaldepends on the component'Tahoma bold 16'
'Times 12'
fontThe font to be used for displaying the component text — for example, property value, action caption, table textExpression(string value)depends on the component'Tahoma bold 16'
'Times 12'
classCSS classes of the component (separated by spaces)Expression (string value)NULLsome-class-one some-class-two
fontSizeThe size of the font to be used for displaying the component textNumeric literaldepends on the component10
fontStyleThe style of the font to be used for the component text May contain the words 'bold' and/or 'italic', or an empty stringString literal'''bold'
'bold italic'
backgroundThe color to be used for the component backgroundExpression (COLOR value)NULL#FFFFCC
RGB(255, 0, 0)
foregroundThe color to be used for the component textExpression (COLOR value)NULL#FFFFCC
RGB(255, 0, 0)
panelCaptionVerticaldeprecated since version 6, use captionVerticalLogical literalTRUETRUE
FALSE
captionVerticalIndicates that the captions of property or action components should be drawn above the value on the panelLogical literalTRUETRUE
FALSE
panelCaptionLastdeprecated since version 6, use captionLastLogical literalFALSETRUE
FALSE
captionLastIndicates that the value should be drawn on the panel prior to the property captionLogical literalFALSETRUE
FALSE
panelCaptionAlignmentdeprecated since version 6, use captionAlignmentHorzAlignment typeSTARTSTRETCH
captionAlignmentHorzComponent caption horizontal alignment. Acceptable values: START (at the beginning), CENTER (in the center), END (at the end), STRETCH (stretched).Alignment typeSTARTSTRETCH
captionAlignmentVertComponent caption alignment. Acceptable values: START (at the beginning), CENTER (in the center), END (at the end), STRETCH (stretched).Alignment typeCENTERSTRETCH
showIfSpecifies a condition under which the component will be displayed.Expression (logical value)NULLisLeapYear(date)
hasComplexity(a, b)

Container properties

Property nameDescriptionValue typeDefault valueExamples
captionContainer headerExpression (string value)NULL'Caption'
captionClassCSS-classes of container header (separated by space)Expression (string value)NULL'some-caption-class'
valueClassCSS-classes of container value (separated by space)Expression (string value)NULL'some-value-class'
imageImage shown in the container caption: a path relative to the images folder, or a property expression yielding the imageExpression (string value)NULL'image.png'
collapsibleLets the user collapse and expand the container; when collapsed, only its caption is shownLogical literaldepends on the captionTRUE
FALSE
popupShows the container's content in a popup opened from its caption instead of inline (the container starts collapsed)Logical literalFALSETRUE
FALSE
borderDraws a border around the containerLogical literalFALSETRUE
FALSE
collapsedMakes a collapsible container start collapsedLogical literalFALSETRUE
FALSE
horizontalContainer is horizontalLogical literalFALSETRUE
FALSE
tabbedContainer is tabbedLogical literalFALSETRUE
FALSE
childrenAlignmentAlignment of child components inside a container. Acceptable values: START, CENTER, ENDAlignment typeSTARTCENTER
alignCaptionsAligns child property captions into a shared column so their values line upLogical literaldepends on the containerTRUE
FALSE
gridLays children out as a grid (using lines as the number of tracks and each child's span) instead of a plain linear flowLogical literalFALSETRUE
FALSE
wrapAllows children to wrap onto several lines when they do not fit in oneLogical literaldepends on the containerTRUE
FALSE
resizeOverflowAllows the container to grow beyond the available space when its content overflows (acts as a maximum size)Logical literalFALSETRUE
FALSE
customRenders the container with a custom client-side view (web client only). The value form selects the renderer: a string literal matching [A-Z][A-Za-z0-9_$]* (a bare identifier starting with an uppercase letter) names a React component, while an empty string '', an HTML template string, or a property gives the classic custom view (its name, path, or inline definition)Expression (string value)NULL'OrderBoard'
'myView'
linesNumber of lines (rows or columns) in containerInteger literal13
lineSizeBase size of each line track in a multi-line or grid container, in pixelsInteger literalNULL60
captionLineSizeBase size of the shared caption-column track when captions are aligned, in pixelsInteger literalNULL60
reversedReverses the order of child components (and the line direction in a multi-line layout)Logical literaldepends on the containerTRUE
FALSE
lineShrinkAllows the line tracks of a multi-line container to shrink below their base sizeLogical literaldepends on the containerTRUE
FALSE

Properties of actions and properties on the form

Property nameDescriptionValue typeDefault valueExamples
autoSizeAutomatic component size option. Applies to text components onlyExtended Logical literalFALSETRUE
FALSE
changeOnSingleClickSpecifying that change event should be triggered after the property component is clicked onceExtended Logical literaldepends on the propertyTRUE
FALSE
hideSpecifying that the property (action) component should be always hiddenExtended Logical literalFALSETRUE
FALSE
maxValueThe maximum numerical value that the property component can haveInteger literalNULL1000000
5000000000L
echoSymbolsSpecifying that a set of * characters will be displayed instead of the property value. Used for passwords, for exampleExtended Logical literalFALSETRUE
FALSE
noSortNo sortingLogical literalFALSETRUE
FALSE
defaultCompareDefault filter. Allowed values: =, >, <, >=, <=, !=, =* (contains), =@ (fuzzy search).String literaldepends on the property>
valueSizeWidth and height of the property value cell in pixelsA pair of Integer literals (width, height)(-1, -1)(100, 20)
valueHeightHeight of the property value cell in pixelsInteger literaldepends on the property100
valueWidthWidth of the property value cell in pixelsInteger literaldepends on the property100
captionHeightHeight of the property caption in pixelsInteger literal-1100
captionCharHeightHeight of the property caption in charsInteger literal-15
captionWidthWidth of the property caption in pixelsInteger literal-1100
charHeightHeight of the property value cell in characters (rows); -1 means the height is derived from the property value typeInteger literal-12
charWidthWidth of the property value cell in characters; -1 means the width is derived from the property value typeInteger literal-110
valueFlexForces the value cell to grow and fill the available width, overriding the type-derived defaultLogical literaldepends on the propertyTRUE
FALSE
changeKeyThe key that will trigger the property change event. The definition principle is similar to specifying a parameter in Keystroke.getKeystroke(String)Expression (string value)NULL'ctrl F6'
'BACK_SPACE'
'alt shift X'
showChangeKeySpecifying that the property caption will include that name of the key shortcut that will trigger the change eventExtended Logical literalFALSETRUE
FALSE
changeMouseThe mouse action that will trigger the property change eventExpression (string value)NULL'DBLCLK'
showChangeMouseSpecifying that the property caption will include that name of the mouse action that will trigger the change eventExtended Logical literalFALSETRUE
FALSE
focusableSpecifying that the property (action) component or a table column can get focusExtended Logical literalNULLTRUE
FALSE
inlineRenders the property or action inline within its container's flow rather than as a separate layout boxExtended Logical literalNULLTRUE
FALSE
panelColumnVerticalIn a panel, stacks the property's column-group columns vertically instead of horizontallyLogical literalFALSETRUE
FALSE
classCSS-classes for property (separated by space)Expression (string value)NULLsome-class-one some-class-two
footerClassCSS-classes for property footer (separated by space)Expression (string value)NULLsome-footer-class
valueClassCSS-classes for the property value (separated by space)Expression (string value)NULLsome-value-class
captionClassCSS-classes for the property caption (separated by space)Expression (string value)NULLsome-caption-class
captionCaption of a property or actionString literalcaption of a property or action'Caption'
tagHTML tag used to render the value element (for example input, a, button, select); overrides the auto-chosen tagString literalNULL'a'
inputTypeHTML input type used when editing the value (for example password, range); overrides the type-derived defaultString literalNULL'password'
imageThe path to the file with the image to be displayed as an action icon. The path is specified relative to the images folderString literalNULL'image.png'
imagePathdeprecated since version 6, use imageString literalNULL'image.png'
commentComment of a property or actionExpression (string value)NULL'Comment'
commentClassClass of comment of property or actionExpression (string value)NULL'comment-class'
panelCommentVerticalIndicates that the comment of property or action should be drawn above or below the value on the panelExtended Logical literalFALSETRUE
FALSE
panelCommentFirstIndicates that the comment should be drawn on the panel before property valueExtended Logical literalFALSETRUE
FALSE
panelCommentAlignmentComment component alignment inside the container. Acceptable values: START (at the beginning), CENTER (in the center), END (at the end), STRETCH (stretched).Alignment typeCENTERSTRETCH
placeholderPlaceholder of a property or actionExpression (string value)placeholder of a property or action'Placeholder'
patternProperty value formatting template. The syntax of template definition is similar to the DecimalFormat or SimpleDateFormat syntax, depending on the value typeExpression (string value)NULL#,##0.00
regexpThe regular expression that the property value must match during inputExpression (string value)NULL'^((8|\\+7)[\\- ]?)?(\\(?\\d\{3\}\\)?[\\- ]?)?[\\d\\- ]\{7,10\}$'
regexpMessageThe message to be shown to the user if they enter a value that does not match the regular expressionExpression (string value)default message'Incorrect phone number format'
tooltipThe tip to be shown when the cursor hovers over the caption of a property or actionExpression (string value)Default tooltip'Tip'
valueTooltipThe tip to be shown when the cursor hovers over the value of a propertyExpression (string value)Default tooltip'Tip'
valueAlignmentComponent value alignment. Acceptable values: START (at the beginning), CENTER (in the center), END (at the end), STRETCH (stretched).
deprecated since version 6, use valueAlignmentHorz
Alignment typeSTARTSTRETCH
valueAlignmentHorzComponent value alignment horizontal. Acceptable values: START (at the beginning), CENTER (in the center), END (at the end), STRETCH (stretched).Alignment typedepends on the propertySTRETCH
valueAlignmentVertComponent value alignment vertical. Acceptable values: START (at the beginning), CENTER (in the center), END (at the end), STRETCH (stretched).Alignment typedepends on the propertySTRETCH
panelCustomUses a custom layout for the property in a panel instead of the standard caption-and-value layoutLogical literaldepends on the propertyTRUE
FALSE
valueOverflowHorzBehavior when the value content exceeds the cell width: auto, clip, or visible (CSS overflow-x)String literaldepends on the propertyauto
clip
visible
valueOverflowVertBehavior when the value content exceeds the cell height: auto, clip, or visible (CSS overflow-y)String literalclipauto
clip
visible
valueShrinkHorzAllows the value cell to shrink below its base widthLogical literaldepends on the propertyTRUE
FALSE
valueShrinkVertAllows the value cell to shrink below its base heightLogical literaldepends on the propertyTRUE
FALSE
highlightDuplicateHighlights cells whose value repeats another cell's value in the same columnLogical literaldepends on the tableTRUE
FALSE
wrapWordBreakWhen the value wraps, allows breaking inside long words rather than only at spacesLogical literalFALSETRUE
FALSE
ellipsisTruncates overflowing value text with an ellipsisLogical literaldepends on the propertyTRUE
FALSE
collapseCollapses the value cell to a single line, without expanding for multi-line contentLogical literaldepends on the propertyTRUE
FALSE
captionWrapAllows the property caption text to wrap onto several linesLogical literaldepends on the propertyTRUE
FALSE
captionWrapWordBreakWhen the caption wraps, allows breaking inside long wordsLogical literalFALSETRUE
FALSE
captionEllipsisTruncates an overflowing caption with an ellipsisLogical literalTRUETRUE
FALSE
captionCollapseCollapses the caption to a single lineLogical literalFALSETRUE
FALSE
clearTextSpecifying that the current text should be reset when input startsExtended Logical literalFALSETRUE
FALSE
notSelectAllSpecifying that the text is not selected at the start of editingExtended Logical literalFALSETRUE
FALSE
askConfirmSpecifies that an attempt to change the property (execute an action) will show a confirmation requestExtended Logical literalFALSETRUE
FALSE
askConfirmMessageText of the confirmation request shown when an attempt to change the property (execute the action) is madeString literaldefault message'Are you sure you want to modify this property?'
toolbarWhether the value cell shows its own small control toolbarExtended Logical literaldepends on the propertyTRUE
FALSE
toolbarActionsWhether the value cell's toolbar includes the property's action buttonsExtended Logical literaldepends on the propertyTRUE
FALSE
notNullSpecifies that in case of a NULL property value, the component of this property should be highlightedExtended Logical literalthe property's notNullTRUE
FALSE
selectRenders the value as a selection control over its possible values; a string chooses the control kind (for example 'dropdown', 'list', 'buttongroup', 'input'), and NULL disables itString literalNULL'dropdown'
defaultValueDefault value (on start editing, only for custom interpreter)Expression (string value)NULLdefault value
defaultValue(a, b)

Toolbar properties

Property nameDescriptionValue typeDefault valueExamples
visibleSpecifying the visibility of the componentLogical literalTRUETRUE
FALSE
showGroupShow the view buttons
deprecated since version 6, use showViews
Extended Logical literalTRUETRUE
FALSE
showViewsShow the view buttonsExtended Logical literalTRUETRUE
FALSE
showFiltersShow the filters setting buttonExtended Logical literalTRUETRUE
FALSE
showSettingsShow the table setting buttonExtended Logical literalTRUETRUE
FALSE
showCountQuantityShow the row quantity calculation buttonExtended Logical literalTRUETRUE
FALSE
showCalculateSumShow the column sum calculation buttonExtended Logical literalTRUETRUE
FALSE
showPrintGroupXlsShow the XLS export buttonExtended Logical literalTRUETRUE
FALSE
showManualUpdateShow the manual update buttonExtended Logical literalTRUETRUE
FALSE

Grid properties

Property nameDescriptionValue typeDefault valueExamples
autoSizeMakes the table size itself to its content instead of filling the available spaceLogical literalFALSETRUE
FALSE
boxedDrawing a frame (box) around a componentLogical literalTRUETRUE
FALSE
tabVerticalSpecifying that focus will be moved from top to bottom (not from left to right)Extended Logical literalFALSETRUE
FALSE
quickSearchSpecifying that the table will support quick element searchExtended Logical literalFALSETRUE
FALSE
headerHeightHeader height in pixelsdeprecated since version 6, use captionHeightInteger literalNULL60
captionHeightHeader height in pixelsInteger literalNULL60
captionCharHeightHeader height in charsInteger literalNULL5
resizeOverflowAllows the table to grow beyond its allotted space when rows overflow (acts as a maximum height)Logical literalFALSETRUE
FALSE
lineWidthBase width of a table row's content line, in pixelsInteger literalNULL60
lineHeightBase height of a table row, in pixelsInteger literalNULL60
enableManualUpdateEnables the manual update mode by defaultExtended Logical literalFALSETRUE
FALSE
hierarchicalWidthWidth of first tree columnInteger literalNULL100
hierarchicalCaptionCaption of first tree columnString literal'Tree'Tree caption

Other properties

Property nameApplies toDescriptionValue typeDefault valueExamples
visiblecustom filter, class treeSpecifying the visibility of the component for setting custom filters (class tree)Extended Logical literalTRUETRUE
FALSE

selector parameters

  • componentName

    Name of a design component. Simple ID.

  • formPropertyName

    Property/action name on the form.

  • filterName

    The name of a filter on the form. Simple ID.

  • filterGroupName

    The name of a filter group. Simple ID.

  • propertyGroupSelector

    The name of a property group. Simple ID.

  • groupObjectSelector

    The name of an object group on the form. Simple ID.

  • treeSelector

    The name of an object tree on the form. Simple ID.

  • noGroupObjectTreeContainerType

    Type of form container:

    • BOX – a common form container
    • OBJECTS – contains the components of all object groups / trees on the form
    • PANEL – contains components of properties that are displayed in PANEL view and display group of which is undefined.
    • TOOLBARBOX – a common toolbar container with property components that are displayed in the panel, marked for placement on the TOOLBAR, and for which no object group is defined.
    • TOOLBARLEFT - the left part of the toolbar
    • TOOLBARRIGHT - the right part of the toolbar
    • TOOLBAR contains components of properties that are displayed in TOOLBAR view and display group of which is undefined.
    • POPUP – the collapsed popup container (the "⋮" overflow menu)
  • groupObjectTreeContainerType

    The type of an object group / tree container.

    • All types of containers of the noGroupObjectTreeContainerType form except OBJECTS (identical semantics)
    • GRID - a table component
    • TOOLBARSYSTEM - a system toolbar (number of records, group change, etc.).
    • FILTERGROUPS - contains filter group components
    • FILTERBOX - contains the user filter and its controls
    • FILTERS - a component that displays custom filters
    • FILTERCONTROLS - the user filter controls

Examples

DESIGN order { // customizing the design of the form, starting with the default design
// marking that all changes to the hierarchy will occur for the topmost container
// creating a new container as the very first one before the system buttons,
// in which we put two containers - header and specifications
NEW orderPane FIRST {
fill = 1; // specifying that the container should occupy all the space available to it
MOVE BOX(o) { // moving everything related to the object o to the new container
PANEL(o) { // configuring how properties are displayed in the object o panel
horizontal = FALSE; // making all descendants go from top to bottom
NEW headerRow1 { // creating a container - the first row
horizontal = TRUE;
MOVE PROPERTY(date(o)) { // moving the order date property
// "override" the property caption in the form design (instead of the standard one)
caption = 'Date of the edited order';
// setting a hint for the order date property
tooltip = 'Input here the date the order was made';
background = #00FFFF; // making the background red
}
MOVE PROPERTY(time(o)) { // moving the order time property
foreground = #FF00FF; // making the color green
}
MOVE PROPERTY(number(o)) { // moving the order number property
// setting that the user should preferably be shown 5 characters
charWidth = 5;
}
MOVE PROPERTY(series(o)); // moving the order series property
}
NEW headerRow2 {
horizontal = FALSE; // descendants - from top to bottom
}
MOVE PROPERTY(note(o));
}

size = (400, 300); //specifying that the container o.box should have a base size of 400x300 pixels
}
// creating a container that will store various specifications for the order
NEW detailPane {
// marking that this container should be a tab panel, where its descendats are tabs
tabbed = TRUE;
MOVE BOX(d) { // adding a container with order lines as one of the tabs in the top panel
caption = 'Lines'; // setting the caption of the tab panel
// making the row number column never have focus
PROPERTY(index(d)) { focusable = FALSE; }
GRID(d) {
// making sure that by default the focus when opening the form is set to the row table
defaultComponent = TRUE;
}
}
MOVE BOX(s) { // adding a container with sku totals as one of the detailPane tabs
caption = 'Selection';
}
}
}
}

// splitting the form definition into two statements (the second statement can be transferred to another module)
DESIGN order {
// removing the container with print and export to xls buttons from the hierarchy, thereby making them invisible
REMOVE TOOLBARLEFT;
}

The output is the following form: