This is a bunch of tips and techniques related to Oracle PL/SQL and Forms.
Purpose
This bean allows to display buttons with a html content.
The content can be text or image.
On the screenshot below, we can see a button with an image that comes from an internet url
(<img src="http://....">)

The java code
| package oracle.forms.fd; import java.awt.*; import java.util.StringTokenizer; public class HtmlButton extends VBean implements ActionListener } |
Forms configuration
Implementation Class property
oracle.forms.fd.HtmlButton
Properties that can be set
The background color of the button
Set_Custom_Property( 'BLOC3.BEAN_ITEM',1, 'SETBACKGROUND','rgb_color' ) ;
The label
Set_Custom_Property( ‘BLOCK.BEAN_ITEM’, ‘SETLABEL’, ‘the_label’ ) ;
The sample dialog
The code that set the button properies is located in the When-New-Form-Instance trigger
| ------------------- -- Text button -- ------------------- -- Set the background color -- Set_Custom_Property( 'BLOC3.BEAN',1, 'SETBACKGROUND','143,161,253' ) ; -- Set the label -- LC$ButLabel := '<html><center>' || '<font size=5 color=#ff0000>Co<font size=5 color=#00ff00>lo<font size=5 color=#0000ff>red</u></b></font>' || '<br><font size=3 color=#ffff00><b>HTML B</b><i>utton</i></font>' ; Set_Custom_Property( 'BLOC3.BEAN',1, 'SETLABEL', LC$ButLabel ) ; -------------------- -- Image button -- -------------------- -- Set the background color -- Set_Custom_Property( 'BLOC3.BEAN2',1, 'SETBACKGROUND','255,255,255' ) ; LC$ButLabel := '<html><table border="1"><tr><td align="center" valign="center"><img src="http://fdtool.free.fr/forms-pjc-bean/tmp/will.jpg" height="80" width="80" align="middle"></td></tr></table>' ; Set_Custom_Property( 'BLOC3.BEAN2',1, 'SETLABEL', LC$ButLabel ) ; |