Create your own interface for 4D Write Pro

You want to quickly create a menu bar to manage your 4D Write Pro areas? You want to create your own contextual menu for your end-users ? You would like to create a color mosaic to change the document background? So this feature is made for you – and better, you do not even need to write a single line of code…

We added standard actions to handle 4D Write Pro areas. They can be defined at design phase or by programming. More than 80+ actions are available and to name just some of them: Font style (bold, italic, underline), Font color, Background color, Text alignment (left, center, right, justify…), Borders (style, color, width, radius…), Spellchecker actions…

Something important to notice, when assigned to interface objects, standard actions automatically handle the activation/disabling of the object depending on the context. Easy!

Here is an example of a 4D Write Pro menu using the standard actions:

4D Write Pro menu

 

In addition to menus, a simple action toolbar can be built very easily using a standard action for each button:

4D Write Pro toolbar with Standard actions

Standard actions can also be used to replace the default contextual menu of 4D Write Pro area with your own contextual menu so it perfectly fits your needs:

To discover all the possibilities and power of the standard actions, and get more details about their usage, we recommend you take a look at this blog post about standard actions.

In the following database, you can see how to use the standard action in each different way:

Example Database

List of actions

Each action from the (very rich) context menu of 4D Write Pro area is now available as standard actions. It means you can now access all these actions by programming even if a WP command doesn’t exist yet!

Here is non-exhaustive list of standard actions available for 4D Write Pro areas as there is near a hundred of actions:

  • fontBold, fontItalic, fontUnderline, fontLinethroughfontSubscript and fontSuperscript  to toggle the bold, italic, underline, line-through, subscript and superscript font attributes
  • fontSize or color with a parameter to set a given font size or font color
  • font/showDialog, color/showDialog or backgroundColor/showDialog to display the system font, font color picker or font background color dialog
  • borderStyle, borderColor, borderRadius, borderWidth with a parameter to define the document/paragraph/image/text border style, color, radius and width
  • margin or padding with a parameter to define the document/paragraph/image/text margin or padding
  • bookmark and a parameter to select a given bookmark
  • visibleReferencescomputeExpressions or freezeExpressions to display, update or freeze all dynamic expressions in the area
  • all spellchecking related actions. Among others: spell/autoCorrectionEnabled, spell/autoLanguageEnabled, spell/showDialog, …
  • visibleBackground, visibleFooters, visibleHeaders, visibleHiddenChars, visibleHorizontalRuler or visiblePageFrames to show/hide document background, footers, headers, hidden characters, horizontal ruler or page frame
  • zoom with a given value passed as parameter to define the view zoom
  • merge or split to merge/split paragraphs
  • pageMode with a parameter to define the page view mode (draft, embedded, page)

Look at the complete list of 4D Write Pro standard actions >

New commands

The INVOKE ACTION command has been added. It executes a standard action in a defined context.

To know if a standard action is applicable and valid in the current context, you can use the new Get action info command.

Vanessa Talbot
• Product Owner •Vanessa Talbot joined 4D Program team in June, 2014. As a Product Owner, she is in charge of writing the user stories then translating it to functional specifications. Her role is also to make sure that the feature implementation delivered is meeting the customer need.Since her arrival, she has worked to define key features in 4D. She has worked on most of preemptive multi-threading new features and also on a very complex subject: the new architecture for engined application. Vanessa has a degree from Telecom Saint-Etienne. She began her career at the Criminal Research Institute as a developer for the audiovisual department. She has also worked in media and medical fields as expert in technical support, production as well as documenting new features.