Purpose

Sometimes I find questions on forums on how to handle frames at runtime.
Of course, at this moment (10gR2), there is no built-in available.
This is a workaround that allows to create and handle frames at runtime.


Frame


The Java code

Get the full source code here

Implementation Class property

     oracle.forms.fd.frame

Note : The frame is not displayed inside the Forms JavaBean component, so you can set its Mouse and Keyboard navigation properties to NO.

The properties you can set

(properties with bold font are required.)

Create a new frame


Set_Custom_Property( 'BLK.BEAN', 1, 'INIT_FRAME', 'v1,...,vn' ) ;

type : line or lowered
line width : width of the line in pixels
title
font name
font size
weight :
     . N ormal
     . I talic
     . B old
     . BI bold + italic
Alignment:
     . left
     . center
     . right

The font of the title frame

Set_Custom_Property( 'BLK.BEAN', 1, 'SET_FONT', 'name[,size[,weight[,alignment]]]' ) ;

font name
font size
weight :
     . N ormal
     . I talic
     . B old
     . BI bold + italic
Alignment:
     . left
     . center
     . right


The frame title color

Set_Custom_Property( 'BLK.BEAN', 1, 'SET_FRAME_TITLE_COLOR', 'r,g,b' ) ;


The frame background color

Set_Custom_Property( 'BLK.BEAN', 1, 'SET_BACKGROUND', 'r,g,b' ) ;


The frame bounds

Set_Custom_Property( 'BLK.BEAN', 1, 'SET_BOUNDS', 'x,y,w,h' ) ;

x : x position in pixel on the canvas
y : y position in pixel on the canvas
w : width in pixel
h : height in pixel


Set the title

Set_Custom_Property( 'BLK.BEAN', 1, 'SET_TEXT', 'title[,alignment]' ) ;

title
alignment :
     . left
     . center
     . right


The sample dialog

     . Download the frame.zip file
     . Unzip the file
     . copy the frame.jar file in the <ORACLE_HOME>/forms/java directory
     . Edit your /forms/server/formsweb.cfg file
     . Open the FRAME.fmb module (Oracle Forms 9.0.2)
     . Compile all and run the module