Overblog
Suivre ce blog
Editer l'article Administration Créer mon blog
3 mars 2006 5 03 /03 /mars /2006 18:31

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


Hide the frame

Set_Custom_Property( 'BLK.BEAN', 1, 'HIDE', '' ) ;


Show the frame

Set_Custom_Property( 'BLK.BEAN', 1, 'SHOW', '' ) ;



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



Partager cet article

Published by Oracle Forms community - dans Bean - general
commenter cet article

commentaires

Bekcic Aleksandar 12/04/2007 13:54

Works nice with IE7.I have some troubles on Firefox (2.0.0.3) as the form crashes every time I open it, sometimes immediately, sometimes after some time.Any known issue ?Thanks,Aleksandar