4D Write Pro: New standard actions for tables, rows, and cells

4D v18 R3 brings new standard actions to 4D Write Pro. They target tables and their elements (i.e., rows and cells). These actions let you to define a table’s border, a cell’s background color, the vertical alignment of the text in a row, as well as the alignment of the table itself in the document … just to name a few. All standard actions are accessible either through simple buttons, dropdown lists, or menus or through a few short lines of code. Want more? The menus are automatically adapted to the user’s language! Plus, tables, buttons, lists, and menus are automatically activated or deactivated depending on the user’s current selection. This saves developers a lot of time!

available actions

The available actions for tables, rows, and cells are numerous. For example, border thickness, styles, and colors, as well as background color, margins, and horizontal alignment (for the table) … in addition to inner margins and vertical alignment (for the cells).
How to proceed? Look no further than … the standard action field in the Property List.


In a dropdown list, for example, enter “table/borderWidth” or “table/borderStyle” or “table/backgroundColor” and they’ll automatically be filled with the possible values for each attribute.


For a button, you just need to specify the value to assign to it after the property.



To create a menu that allows you to change the thickness, style, and color of the borders, the following few lines of code are all you need:

// create the menu
:=Create menu
// add items
APPEND MENU ITEM($menu;ak standard action title)
SET MENU ITEM PROPERTY($menu;-1;Associated standard action;"table/borderWidth")
APPEND MENU ITEM($menu;ak standard action title)
SET MENU ITEM PROPERTY($menu;-1;Associated standard action;"table/borderStyle")
APPEND MENU ITEM($menu;ak standard action title)
SET MENU ITEM PROPERTY($menu;-1;Associated standard action;"table/borderColor")
// call the menu
$s:=Dynamic pop up menu($menu)

What about rows and cells?

Easy! Just replace the “table” prefix by “row” or “cell“.

And columns?

A quick note about columns. The concept of columns is relatively abstract because, technically, they don’t exist in tables … they contain only rows and cells. However, to make standard actions commonplace, they can also be used on columns! Just know that the properties will not be applied to the columns (since they do not exist!) but to each of their cells.

Updated 4D Write Pro interface

Thanks to these standard actions, we’re pleased to announce that the 4D Write Pro interface has been greatly enhanced in terms of table processing possibilities. Four new buttons have been added for changing the appearance of tables, rows, columns, and cells:
For more information, have a look at the documentation and have fun!
Roland Lannuzel
• Product Owner & 4D Expert •After studying electronics, Roland went into industrial IT as a developer and consultant, building solutions for customers with a variety of databases and technologies. In the late 80’s he fell in love with 4D and has used it in writing business applications that include accounting, billing and email systems.Eventually joining the company in 1997, Roland’s valuable contributions include designing specifications, testing tools, demos as well as training and speaking to the 4D community at many conferences. He continues to actively shape the future of 4D by defining new features and database development tools.