Lasernet has the ability to manipulate fonts and text to create flexible and dynamic outputs: this functionality is called Styles.
Styles are similar to the Heading and Font Styles found in Microsoft Word, Publisher, etc. A Style is a group of text settings that can be stored, reused and modified centrally (globally or locally) and applied to output rearranges across Forms. Instead of having to control and set each output rearrange separately, as was necessary in previous versions, Styles can be used to speed up the design process whilst ensuring consistency across forms.
Creating Styles
Styles can only be accessed from within the Form developer. The Styles tab is located on the toolbar.
To create a style, follow these steps:
1. With an output rearrange selected, click the Styles option on the toolbar and then select New Style from Selection...
This opens up the Style Profile properties where the following fields need to be specified: Profile Name, Scope (Local or Global, which we will touch on later), Font, Size, Colour. In this first example, we will create a bold header that can be applied to page titles using certain settings:
2. Create two more local styles for Sub-headers and Body text so they look similar to those shown in the image to get a feel for the options available:
If you hover over the Style, you can get a breakdown of the main settings. In this example there are lots of different sizes and styles of fonts in the output which makes the Form look unprofessional and haphazard:
By applying the newly created style to the elements on the form it is possible to standardize it quickly
3. Highlight the output and select the desired style from the dropdown. In this example the 'Body' Style is applied to the Customer Name, Account Number, Statement Date, Balance and Billing Address. The output is now consistent and as a result, much neater.
From this point forward, additional form creation work can be streamlined by reusing the saved styles to quickly standardize the output.
Global & Local Styles
There are two different types of Styles to create and manage:
Global - Global styles are accessible (usable) in any form throughout the build.
Local - Local styles are only accessible (usable) within the particular Form it was created in
With an output rearrange selected, select Styles and click New Style from Selection... This opens up the Style Profile properties where you can create a Global style.
Global styles are useful if you have lots of different Statement variants to create, but you still need a consistent font style across all of them. The example below shows the new Global Style being applied to the table column headers:
Global styles are recognisable by the globe icon next to them:
When another Form is opened within the same build configuration, the option of applying this global style is available. To make changes to any Style, right-click it and select Edit to bring up the Properties window.
When you make changes to a Global Style remember that this will change all instances where the Style is in use, across all forms. So be very careful when making these changes. Global Styles also have the benefit of being able to be exported and imported like other objects. Lasernet Styles also allow you to capture the settings from an existing text output and use it to update or create a new style which you can then reuse (either locally or globally).
To create a New Style, with the output rearrange selected, right-click and choose New Style From Selection... and the Style will then be available in the styles menu.
To Update an existing Style, right-click a Style from the Style menu and click Update to Match Selection with the desired output selected.
Shape Styles
To complement the text styles, it is also possible to create Shape Styles. To read more about using shapes please refer to the this article about The Lasernet shape tool and the benefits of Overlay free forms.
Shape Styles work in a very similar way to text Styles and can also be made available either locally or globally. To create a shape style, select a shape on the output, open Styles and click New Style from Selection to open the properties. The properties available are Scope, Fill, Line Colour, Style and Width. They are applied in the same way as text styles, by selecting the Style from the drop-down, with the desired shape selected in the output.
Add a comment
Please log in or register to submit a comment.