Custom Search

Friday, January 21, 2011

Display Icons on Push Buttons in Application Server 10g

Forms 10g no longer supports ICO files as icons for the buttons. You will need to convert your icon files into GIF or JPG format.




Design time Configuration

To display the icons in your Forms builder, modify your windows registry Hkey_Local_Machine\Software\Oracle\\UI_ICON by entering the path of your GIF/JPG files for e.g. C:\MY_APP\ICONS.

Runtime Configuration

1) Creating Jar file

i) Once you are ready with your GIF files or JPG files, create a folder called ICONS. You can create this folder anywhere. For e.g. you can create ICONS folder on a C drive under root directory or as a sub-folder under any folder.
ii) Assuming you have created ICONS folder as a root folder on C drive, now copy all your GIF files in this folder.
iii) Go to the DOS prompt and enter cd\
iv) At C:\ prompt enter the following command to create Java Archive File (JAR) called my_icons

Jar –cvf my_icons.jar icons
v) Copy this file in \Forms\Java folder.
Please remember that having the name of the folder holding GIF/JPG files as ICONS is very important. Because if the folder name is something else, icons will not be displayed in your form at run time. This reason is not mentioned anywhere in Oracle’s documentation. I learnt about this through metalink (Service Request no. 6602276.993) after struggling for more than one day to display the icons.



2) Modify REGISTRY.DAT file
i) Open this file located in \forms\java\oracle\forms\registry folder.
ii) Append the existing parameter default.icons.iconpath as follows:

default.icons.iconpath=icons/
iii) If you are going to use GIF files as image files for icons, then leave the existing parameter default.icons.iconextension=gif as it is. If you want to use JPG files instead of GIF files, replace GIF with JPG as shown below:

default.icons.iconextension=jpg

3) Modify FORMSWEB.CFG file
This file exists under \Forms\Server folder.
Append the following existing parameters:

i) imagebase=codebase

ii) archive_jini=frmall_jinit.jar,frmwebutil.jar,jacob.jar,my_icons.jar

No comments:

Post a Comment