WebTextArea

General

A WebTextArea is a scrollable, multi-line region that displays text.

WebTextArea encapsulates the HTML <textarea> tag.

Example

Below fou find an example of how to use a WebTextArea. You can try this example online: http://www.innoopract.com/w4content/

Properties of the WebTextArea Component can be easily set in the Property-Editor of the W4T Eclipse Perspective. This example shows how to set the size of a WebTextArea programmatically. The code is located in the in the event handler section and executed when buttons or checkboxes are clicked.

The example WebTextArea is named wtaExample.

  private void doWcbVisibleControlWebItemStateChanged( WebEvent e ) throws Exception {
    WebCheckBox wcb = ( WebCheckBox )e.getSource();
    boolean visible = wcb.isSelected();
    wtaExample.setVisible( visible );
  }
  
  private void doWcbEnabledControlWebItemStateChanged( WebEvent e ) throws Exception {
    WebCheckBox wcb = ( WebCheckBox )e.getSource();
    boolean enabled = wcb.isSelected();
    wtaExample.setEnabled( enabled );
  }
  
  private void doWbtValueControlWebActionPerformed( WebEvent e ) throws Exception {
    String newValue = wtxValueControl.getValue();
    wtaExample.setValue( newValue );
  }
  
  private void doWslColsControlWebItemStateChanged( WebEvent e ) throws Exception {
    WebSelect wsl = ( WebSelect )e.getSource();
    int cols = Integer.parseInt( wsl.getValue() );
    wtaExample.setCols( cols );
  }
  
  private void doWslRowsControlWebItemStateChanged( WebEvent e ) throws Exception {
    WebSelect wsl = ( WebSelect )e.getSource();
    int rows = Integer.parseInt( wsl.getValue() );
    wtaExample.setRows( rows );
  }
  

API documentation

The API documentation for WebTextArea can be found here.