Overblog Tous les blogs Top blogs Technologie & Science Tous les blogs Technologie & Science
Editer l'article Suivre ce blog Administration + Créer mon blog
MENU

Articles Oracle Forms, PL/SQL, Java, J2EE

Publicité

Forms : a PJC to show/hide scrollbars on Text Items

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 ;
    }
       
    else
    {
     return super.setProperty(property, value);
    }
  } 

}


The Implementation Class text item property must be :  oracle.forms.fd.ScrollTextArea
Publicité
Retour à l'accueil
Partager cet article
Repost0
Pour être informé des derniers articles, inscrivez vous :
Commenter cet article