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 rootFileNode, add:set icon [[getUniqueNode $ROOTNode {/AG/File/DynamicProperties/DynamicProperty [@name='icon']}] @value] -
Find the instruction
[gen_MAIN $DBName $outFormRelNodeList $outReportRelNodeList]and add the$iconparameter:[gen_MAIN $DBName $outFormRelNodeList $outReportRelNodeList $icon] -
Find the instruction
proc gen_MAIN {DBName outFormRelNodeList outReportRelNodeList}and add the icon parameter:proc gen_MAIN {DBName outFormRelNodeList outReportRelNodeList icon} -
Find the instruction
genInitializeResources $outFormRelNodeList $outReportRelNodeList 1and add the icon parameter:[genInitializeResources $outFormRelNodeList $outReportRelNodeList $icon 1] -
Find the instruction
proc genInitializeResources {outFormRelNodeList outReportRelNodeList {indent 0}}and add the icon parameter:{outFormRelNodeList outReportRelNodeList icon {indent 0}} -
Find the instruction
CALL ui.Interface.loadStyles(NVL(l_style, \"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 