protected MoveTextbox ( $strFormId, $strControlId, $strParameter ) |
protected function MoveTextbox($strFormId, $strControlId, $strParameter)
{
if ($strParameter == 'left') {
$pnlSource = $this->pnlRight;
$pnlDestination = $this->pnlLeft;
} else {
$pnlSource = $this->pnlLeft;
$pnlDestination = $this->pnlRight;
}
// Get the Source's Child Controls
$objChildControls = $pnlSource->GetChildControls();
// Only make the move if source has at least one control to move
if (count($objChildControls) > 0) {
// Set the parent of the last control in this array to be the destination panel,
// essentially moving it from one panel to the other
$objChildControls[count($objChildControls) - 1]->SetParentControl($pnlDestination);
}
}