Action Group

Action Group definition: properties, methods and examples.

The UI.ActionGroup is used to display a group of buttons on the Action Bar. It is assigned to UI.ActionBar.

Examples:

Screenshot_2016-02-18-13-14-43
<?php 
/**
 * Main object.
 * @author Kikapp
 * @version 1.0
 */

$win = new SDPanel();
$win->setCaption("ActionBar");
 
$table = new Table();
 
$actionBar = new ActionBar();
$actionBar->setClass("applicationBars");
 
$actionGroup = new ActionGroup();
$actionGroup->setCaption("");
$actionGroup->setImage("img/ico_thumb.png");
 
$buttonBar = new ButtonBar();
$buttonBar->setCaption("Button 1");
$buttonBar->setImage("img/ico_thumb.png");
$buttonBar->onTap(functonClick());
 
$buttonBar_2 = new ButtonBar();
$buttonBar_2->setCaption("Button 2");
$buttonBar_2->setImage("img/ico_thumb.png");
$buttonBar_2->onTap(functonClick_2());
 
$actionGroup->addControl($buttonBar);
$actionGroup->addControl($buttonBar_2);
$actionBar->addControl($actionGroup);
 
$win->addControl($actionBar);
$win->addControl($table);
 
function functonClick(){
 echo "On click button 1!";
}
 
function functonClick_2(){
 echo "On click button 2!";
}
 
?>

Properties:

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

Methods:

  • setCaption( caption )
    Sets the text of the Action Group.
  • setVisible( visible )
    Sets the value of the visible property.
  • setEnabled( enable )
    Sets the value of the enabled property.
  • setPriority( priority )
    Sets the value of the priority property.
  • addControl( control )
    Sets the value of the control property.
iOS Only:
  • setPosition( position )
    Sets the value of the Action Group position property.
  • setHorizontalPosition( horizaontalPosition )
    Sets the value of the Action Group horizontal position property.
  • setVerticalPosition( verticalPosition )
    Sets the value of the Action Group vertical position property.

Download code example

Rate This Article

(0 out of 0 people found this article helpful)