Show TOC

Object documentationButton Row Locate this document in the navigation structure

 

The button row control is a container, that displays several buttons in horizontal order. The advantage of the button row control over multiple usage of the "button" control (which would place the buttons also next to each other) is, that the button row control places the buttons closer to each other and that the distance is constant, regardless of the style sheet settings.

When the button row control is not used in a gridlayout or formlayout, it is always rendered in a new line.

  • addButton

    Adds a button to the button row control.

  • id

    Identification name of the button row.

Attributes

M

Values

Usage

addButton

Component

Taglib

no tag available

Classlib

addButton(Button button)

id

*

String (cs)

Taglib

id="OrderConfirm"

Classlib

setId("OrderConfirm")

Example

using the taglib

Syntax Syntax

  1.   <hbj:buttonRow
         <hbj:button id="OKButton"
              text="OK"
              width="125px"
         />
         <hbj:button id="CancelButton"
              text="Cancel"
              width="125px"
         />
         <hbj:button id="HelpButton"
              text="Help"
              width="125px"
         />
      </hbj:bottonRow>
    
End of the code.

using the classlib

Syntax Syntax

  1.     Form form = (Form)this.getForm();
        ButtonRow br = new ButtonRow();
        Button OKButton = new Button("OKButton", "OK");
        OKButton.setWidth("125px");
        OKButton.setOnClick("ProcessOK");
        Button CancelButton = new Button("CancelButton", "Cancel");
        CancelButton.setWidth("125px");
        CancelButton.setOnClick("ProcessCancel");
        Button HelpButton = new Button("HelpButton", "Help");
        HelpButton.setWidth("125px");
        HelpButton.setOnClick("ProcessHelp");
    
        br.addButton(OKButton);
        br.addButton(CancelButton);
        br.addButton(HelpButton);
        form.addComponent(br);
    
End of the code.
Result

This graphic is explained in the accompanying text.