Starting 4D 21 R2, a new change has been added to bullet and numbered lists in 4D Write Pro: if a list is created using a standard action, it will be automatically indented by a little margin. This means, the user will no longer have to adjust the margin separately. In this blog post, we will briefly go over lists in 4D Write Pro, explain the new feature related to lists and its advantages, and finish off with a concrete example.
Brief Explanation of Lists in 4D Write Pro
If you want to transform a paragraph into a list item, here are the options available to you:
- You can use the command WP SET ATTRIBUTES with the attributes wk list type or wk list image; by code you can have full control over the type of bullet to use (including a custom one) and over the other attributes such as margins.
- You can use the standard actions listStyleType or listStyleImage, which you can use in your own buttons.
- You can use the 4D Write Pro interface; both the Toolbar and the Sidebar use the listStyleType standard action.
What’s New with Lists?
A new improvement was brought to the lists in 4D Write Pro. From now on, whenever you add bullets of any type to your paragraphs using either one of the 2 standard actions listStyleType or listStyleImage, a little margin is automatically added before the text. Specifically, if the text’s direction is from LTR (left to right), then the little margin is added to the left of the text. If on the other hand the text’s direction is RTL (right to left), then the little margin is added to the right of the text.
In order to keep a consistent style throughout the document, we have chosen to make this added margin the same length as the default tab of the document; more precisely, it is equal to the offset attribute of the wk tab default.
Moreover, since the little margin is added when the bullets are added using a standard action, it is only natural for it to be removed when the bullets are removed using a standard action.
This slight adjustment makes the lists have a style that is more consistent with what’s obtained with most word processing tools and therefore more in line with what the end-user is expecting; also, it makes the lists standout even more from the rest of the text.
Example
Below is an example of a simple interface; it contains the following elements:
- A Write Pro area
- 5 buttons that call the following standard actions:
- listStyleType?value=disc
- listStyleType?value=decimal
- listStyleType?value=hollow-square
- listStyleImage/showDialog
- listStyleType?value=none
In the screen recording, you can see that the margin is added before the bullets when they are added using a standard action, and that it is removed when the bullets are removed using a standard action.
Conclusion
4D Write Pro was already offering a variety of options to make paragraphs into bullet or numbered lists. This feature brought a new improvement: the lists are now automatically pushed by a little margin when they are inserted using a standard action. This makes them more consistent with how the user is expecting them to look, and makes them stand out more out of the rest of the text. For more details about lists in 4D Write Pro, check out the documentation, and for your questions and remarks, check out the 4D forum.

