Sometimes the information you include in your document is best displayed in columns. Not only can columns help improve readability, but some types of documents – newspaper articles, newsletters, flyers, etc. – are often written in column format. The good news is that with 4D v17, you can henceforth create multi-column documents with 4D Write Pro! And beyond document creation, you can also convert your existing 4D Write documents containing multiple columns.
As in the 4D Write plugin, it’s possible to define the number of columns for an entire document. But here’s a good example where 4D Write Pro exceeds 4D Write: you can also set a different number of columns … per section!
2 columns in section #1
3 columns in section #2
New set of attributes
- wk column count: define the number of columns for the document or the section
- wk column spacing: define the spacing between two columns
- wk column rule style, wk column rule color, wk column rule width: define the vertical column separator’s style (dotted, dashed, etc.), color or width
// Define 3 columns for the whole document
WP SET ATTRIBUTES(wpDoc;wk column count;3)
// Set the spacing between each column
WP SET ATTRIBUTES(wpDoc;wk column spacing;"36pt")
You can insert a column break so the text starts in the next column with the WP INSERT BREAK command:
WP INSERT BREAK($range;wk column break;wk append)
New standard actions
We’ve also added new 4D Write Pro standard actions to manage multiple columns:
- columnCount: to manage the number of columns
- columnSpacing: to manage the spacing between the columns.
- columnRuleStyle, columnRuleColor, columnRuleWidth: to define the style, color and width of the vertical column separator
- insertBreakColumn: to add a column break