More standard actions for Styled Text areas

You want to quickly create a toolbar for your Styled text areas. You want to change the font of the text or compute/freeze 4D Expressions without writing a line of code. It is possible using the new standard actions for Styled Text areas.

Just associate a standard action to each button object and 4D will handle everything automatically: action triggering but also the button activation or deactivation if the action is not available in the current context.

Here is an example of a color toolbar where each button has a standard action associated.

Standard actions - Color toolbar

 

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, we show you the different possibilities to use standard actions:

Example Database

List of actions

There are several standard actions available for the Styled text areas:

  • fontBold, fontItalic, fontUnderline, fontLinethrough to toggle the bold/italic/underline/line-through font attributes
  • fontStyle to display the standard font style sub menu
  • 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
  • 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, …

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.

Documentation

For more details, please read this article in 4D doc center.

More standard actions are also available for 4D Write Pro areas. There is a lot of different actions available (over 80) for more details you can read this blog post.

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.