/**
  * Add a base list item to the list.
  *
  * @param QListItemBase $objListItem
  */
 public function AddListItem(QListItemBase $objListItem)
 {
     if ($strControlId = $this->GetId()) {
         $objListItem->SetId($strControlId . '_' . count($this->objListItemArray));
         // auto assign the id based on parent id
         $objListItem->Reindex();
     }
     $this->objListItemArray[] = $objListItem;
     $this->MarkAsModified();
 }
 /**
  * PHP magic method
  * @param string $strName
  * @param string $mixValue
  *
  * @return mixed
  * @throws Exception|QCallerException|QInvalidCastException
  */
 public function __set($strName, $mixValue)
 {
     switch ($strName) {
         case "Selected":
             try {
                 $this->blnSelected = QType::Cast($mixValue, QType::Boolean);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "ItemGroup":
             try {
                 $this->strItemGroup = QType::Cast($mixValue, QType::String);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "Label":
             try {
                 $this->strLabel = QType::Cast($mixValue, QType::String);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         default:
             try {
                 parent::__set($strName, $mixValue);
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
             break;
     }
 }
 /**
  * PHP magic method
  * @param string $strName
  * @param string $mixValue
  *
  * @return mixed
  * @throws Exception|QCallerException|QInvalidCastException
  */
 public function __set($strName, $mixValue)
 {
     switch ($strName) {
         case "Anchor":
             try {
                 $this->strAnchor = QType::Cast($mixValue, QType::String);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "Tag":
             try {
                 $this->strTag = QType::Cast($mixValue, QType::String);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         default:
             try {
                 parent::__set($strName, $mixValue);
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
             break;
     }
 }