Button Bar

Button Bar definition: properties, methods, events and examples.

The UI.ButtonBar is used to display a single button on UI.ActionBar or UI.ActionGroup.


 * Main object.
 * @author Kikapp
 * @version 1.0

$win = new SDPanel();
$win -> setCaption("ButtonBar!");

$input= new InputText();
$input->setLabelCaption("Write your name")

$actionBar= new ActionBar();

$btn_save= new ButtonBar();
$btn_save-> setCaption("Save");

$btn_delete= new ButtonBar();
$btn_delete-> setCaption("Delete");

$actionBar-> setClass("applicationBars");

$mainTable = new Table();


$win -> addControl($mainTable);

function save(){
	echo "Your name is ".$input."!";
function delete() {
	return ;



  • caption : String
    The text of the button.
  • visible : Boolean
    Determines whether the button is visible or not.
  • enable : Boolean
    Determines whether the button is enabled or disabled.
  • className : Class
    Class defined in .css stylesheet
  • image : String
    Image for the button, specified as a local file path. ie. "img/icon_40x40.png"
  • priority : Priority
    Buttons's image priority. ie. "High"
iOS Only:
  • position : Position
    Buttons's position. ie. "Default" or "Custom"
  • horizontalPosition : HorizontalPosition
    Buttons's horizontal position. ie."Left","Center" or "Right"
  • verticalPosition : VerticalPosition
    Buttons's vertical position. ie."Top" or "Bottom"


  • setCaption( caption )
    Sets the text of the button.
  • setVisible( visible )
    Sets the value of the visible property.
  • setEnabled( enable )
    Sets the value of the enabled property.
  • setClass( className ) Set style class for the button.
  • setPriority( priority )
    Sets the value of the priority property.
  • iOS Only:
    • setPosition( position )
      Sets the value of the button position property.
    • setHorizontalPosition( horizontalPosition )
      Sets the value of the button horizontal position property.
    • setVerticalPosition( verticalPosition )
      Sets the value of the button vertical position property.


    • onTap( callBack )
      Fired when the device detects a click against the button.
      • Parameters callBack : Function Function to invoke when the event is fired.
      • Returns void
      Here are some tips for the ButtonBar.
    • function save(): will show a tick
    • function delete(): will show a paper basket
    • function update(): will show a pencil
    • function cancel(): will show an X

    Download code example

    Rate This Article

    (0 out of 0 people found this article helpful)