Overblog Suivre ce blog
Editer l'article Administration Créer mon blog


Free tool

Look and Feel Project

26 juin 2007 2 26 /06 /juin /2007 12:01

Here is a PJC that allows showing/hiding scrollbars on a multi-line Text Item.

Actually, there is no property to show the horizontal scrollbar on a Text Area.

scroll bars

Get the JAR file here

Get the Forms sample here (9.0.2)

The Java code is as simple as the following:

package oracle.forms.fd;

import oracle.forms.handler.IHandler;
import oracle.forms.properties.ID;
import oracle.forms.ui.VTextArea;

public class ScrollTextArea extends VTextArea
  public final static ID setHScrollBar     = ID.registerProperty("SET_HORIZONTAL_SCROLLBAR");       
  public final static ID setVScrollBar     = ID.registerProperty("SET_VERTICAL_SCROLLBAR");

   *    Set some properties    *
  public boolean setProperty(ID property, Object value)
    // set the horizontal scrollbar
    if( property == setHScrollBar )
      String s = value.toString() ;
      if(s.equalsIgnoreCase("true")) this.setHDisplayPolicy(1);
      else this.setHDisplayPolicy(2);
      return true ;
    // set the vertical scrollbar
    else if( property == setVScrollBar )
      String s = value.toString() ;
      if(s.equalsIgnoreCase("true")) this.setVDisplayPolicy(1);
      else this.setVDisplayPolicy(2);
      return true ;
     return super.setProperty(property, value);


The Implementation Class text item property must be :  oracle.forms.fd.ScrollTextArea

Partager cet article

Repost 0
Francois Degrelle - dans Oracle Forms
commenter cet article