Modify the tcl script used to generate the code.
-
Open the main.tcl file in the tpl subdirectory of
your template set directory.
-
Find the # Set XPath set of code. On the line following set
ROOTFILELocator, add:
set icon [[getUniqueNode $ROOTNode {/AG/File/DynamicProperties/DynamicProperty
[@name='icon']}] @value]
-
Find the instruction [gen_MAIN $DBName $outFormRelNode] and add the
$icon parameter:
[gen_MAIN $DBName $outFormRelNode $icon]
-
Find the instruction proc gen_MAIN {DBName outFormRelNode} { and add the icon
parameter:
proc gen_MAIN {DBName outFormRelNode icon} {
-
Find the instruction CALL ui.Interface.loadStyles(\"dbapp\") and on the
following line add the call to set your image:
CALL ui.Interface.setImage(\"$icon\")
-
Save the changes.
-
Select .
-
In the OfficestoreAppFlow.4ba, select the Account
program entity and set the value of the Icon property to a valid image name. See
Image directory structure.
-
Save the files.
-
Rebuild and run the Account program and see the icon used in the window
title of the program.
Figure 1. Custom icon in window title