ExampleForm::btnDeleteLeft_Click PHP Méthode

btnDeleteLeft_Click() protected méthode

Handle the action to delete a control from pnlLeft
protected btnDeleteLeft_Click ( $strFormId, $strControlId, $strParameter )
    protected function btnDeleteLeft_Click($strFormId, $strControlId, $strParameter)
    {
        // Get the left panel's Child Controls
        $objChildControls = $this->pnlLeft->GetChildControls();
        // Only remove if pnlLeft has at least one control to remove
        if (count($objChildControls) > 0) {
            // Set the parent of the last control in this array to be NULL,
            // essentially removing it from the panel (and the form altogether)
            $objChildControls[count($objChildControls) - 1]->SetParentControl(null);
        }
    }