Sample 2. Step 18: Creating a CookingTime block
To create the CookingTime block:
- Activate the FlexiLayout window in the program main window.
- Select the Blocks object in the FlexiLayout tree.
- Select Add Block → Text in the FlexiLayout menu or Add Block → Text in the shortcut menu.
- In the Properties dialog box, type a name for the block in the Name field, e.g. CookingTime.
- To describe the location of the block, select Expression.
- Describe the block as a rectangle created by merging the rectangles around the CookingTimeHeader and CookingTime elements. To give the program some leeway, enlarge the height and width of the resulting rectangle by 3mm.
In the FlexiLayout language this must be written as follows:
Rect outputRect;
outputRect = SearchElements.Cooking.CookingTime.Rect Or SearchElements.Cooking.CookingTimeHeader.Rect;
OutputRegion = outputRect;
OutputRegion.Inflate (3*mm, 3*mm);
Show me...
12.04.2024 18:16:02