Start changeButton tag

The following is the basic syntax of the button tag :

<BUTTON name=name>

where name identifies the button programmatically.

The button tag can be expanded with the following elements:
<BUTTON name=name>
	<TITLE>title</TITLE>
	<LOCATION>location</LOCATION>
	<SIZE>size</SIZE>
	<STYLE>style</STYLE>
	<ACTION>action</ACTION>
	<FLYOVER>helptext</FLYOVER>
	<HELPALIAS>component_name</HELPALIAS>
ATTRIBUTEVALUEDESCRIPTION
<TITLE> title Defines the key for loading the text string from the resource bundle. If the string is not found, the title string will appear as it does in the Panel Definition Markup Language (PDML) source file.

Use the "%" character to make the character that immediately follows the "%" the "mnemonic" or "keyboard shortcut key" for the using a button. Use "%%" to use "%" as a literal character.

This tag is required.

<LOCATION> location Expresses the x- and y-coordinates of the panel's location from the top left corner in logical units.

This tag is required.

<SIZE> size Expresses the width and height, respectively, of the component in logical units.

This tag is required.

<STYLE> style Sets the style for the button's appearance. DEFAULT status creates a button with a predefined appearance, and whose action is performed upon pressing the Enter key.
<ACTION> action Initiates the desired action once the button is clicked.

Possible action values are:

  • Commit makes changes to the data objects on the panel by calling the save method for each object. Performing this action closes the window.
  • Cancel closes the panel window. No changes are saved.
  • Help accesses the help browser window.

However, you may also define the action as the name of a handler class, which will receive control when the button is clicked. The class will use the EventHandler class and the java.awt.event.ActionListener interface. The framework will automatically create an object of the desired class and call its actionPerformed method.

<FLYOVER> helptext Creates a help window that hovers over the label.

Helptext defines the key for loading the text string from the resource bundle. If the string is not found, the helptext string will appear as it does in the PDML source code.

<HELPALIAS> component_name An optional tag where the help topic should be displayed when context help is requested for this component.
End change


[ Legal | AS/400 Glossary ]