This object is the foundation for the ListBox, CheckBoxList, RadioButtonList and TreeNav.
Inheritance: extends QControl
Example #1
0
 public function __set($strName, $mixValue)
 {
     $this->blnModified = true;
     switch ($strName) {
         // APPEARANCE
         case "TextAlign":
             try {
                 $this->strTextAlign = QType::Cast($mixValue, QType::String);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "HtmlEntities":
             try {
                 $this->blnHtmlEntities = QType::Cast($mixValue, QType::Boolean);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
             // LAYOUT
         // LAYOUT
         case "CellPadding":
             try {
                 $this->intCellPadding = QType::Cast($mixValue, QType::Integer);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "CellSpacing":
             try {
                 $this->intCellSpacing = QType::Cast($mixValue, QType::Integer);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "RepeatColumns":
             try {
                 $this->intRepeatColumns = QType::Cast($mixValue, QType::Integer);
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
             if ($this->intRepeatColumns < 1) {
                 throw new QCallerException("RepeatColumns must be greater than 0");
             }
             break;
         case "RepeatDirection":
             try {
                 $this->strRepeatDirection = QType::Cast($mixValue, QType::String);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         default:
             try {
                 parent::__set($strName, $mixValue);
                 break;
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
     }
 }
 public function __set($strName, $mixValue)
 {
     $this->blnModified = true;
     switch ($strName) {
         // APPEARANCE
         case "Rows":
             try {
                 $this->intRows = QType::Cast($mixValue, QType::Integer);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "LabelForRequired":
             try {
                 $this->strLabelForRequired = QType::Cast($mixValue, QType::String);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "LabelForRequiredUnnamed":
             try {
                 $this->strLabelForRequiredUnnamed = QType::Cast($mixValue, QType::String);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "HtmlEntities":
             try {
                 $this->blnHtmlEntities = QType::Cast($mixValue, QType::Boolean);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
             // BEHAVIOR
         // BEHAVIOR
         case "SelectionMode":
             try {
                 $this->strSelectionMode = QType::Cast($mixValue, QType::String);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "ItemStyle":
             try {
                 $this->objItemStyle = QType::Cast($mixValue, "QListItemStyle");
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
             break;
         default:
             try {
                 parent::__set($strName, $mixValue);
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
             break;
     }
 }
 /**
  * Returns an description of the options available to modify by the designer for the code generator.
  *
  * @return QModelConnectorParam[]
  */
 public static function GetModelConnectorParams()
 {
     return array_merge(parent::GetModelConnectorParams(), array(new QModelConnectorParam(get_called_class(), 'Rows', 'Height of field for multirow field', QType::Integer), new QModelConnectorParam(get_called_class(), 'SelectionMode', 'Single or multiple selections', QModelConnectorParam::SelectionList, array(null => 'Default', 'QSelectionMode::Single' => 'Single', 'QSelectionMode::Multiple' => 'Multiple'))));
 }
Example #4
0
 /**
  * Overrides the radio list get end script to prevent the default JQueryUi functionality.
  * @return string
  */
 public function GetEndScript()
 {
     $strScript = \QListControl::GetEndScript();
     // bypass the QRadioButtonList end script
     return $strScript;
 }
 /**
  * Returns an description of the options available to modify by the designer for the code generator.
  *
  * @return QModelConnectorParam[]
  */
 public static function GetModelConnectorParams()
 {
     return array_merge(parent::GetModelConnectorParams(), array(new QModelConnectorParam(get_called_class(), 'TextAlign', '', QModelConnectorParam::SelectionList, array(null => 'Default', 'QTextAlign::Left' => 'Left', 'QTextAlign::Right' => 'Right')), new QModelConnectorParam(get_called_class(), 'HtmlEntities', 'Set to false to have the browser interpret the labels as HTML', QType::Boolean), new QModelConnectorParam(get_called_class(), 'RepeatColumns', 'The number of columns of checkboxes to display', QType::Integer), new QModelConnectorParam(get_called_class(), 'RepeatDirection', 'Whether to repeat horizontally or vertically', QModelConnectorParam::SelectionList, array(null => 'Default', 'QRepeatDirection::Horizontal' => 'Horizontal', 'QRepeatDirection::Vertical' => 'Vertical')), new QModelConnectorParam(get_called_class(), 'ButtonMode', 'How to display the buttons', QModelConnectorParam::SelectionList, array(null => 'Default', 'QRadioButtonList::ButtonModeJq' => 'JQuery UI Buttons', 'QRadioButtonList::ButtonModeSet' => 'JQuery UI Buttonset')), new QModelConnectorParam(get_called_class(), 'MaxHeight', 'If set, will wrap it in a scrollable pane with the given max height', QType::Integer)));
 }