Modify tcl script to generate code
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 XPathset of code. On the line followingset ROOTFILELocator, add:set icon [[getUniqueNode $ROOTNode {/AG/File/DynamicProperties/DynamicProperty [@name='icon']}] @value] -
Find the instruction
[gen_MAIN $DBName $outFormRelNode]and add the$iconparameter:[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 Tools > Specific setup > Reload.
-
In the OfficestoreAppFlow.4ba, select the Account
program entity and set the value of the
Iconproperty 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: Custom icon in window title 