public function Open()
 {
     parent::Open();
     $this->pnlValueDisplay->Text = $this->fltValue ? $this->fltValue : '0';
     $this->fltInternalValue = 0;
     $this->blnNextClears = true;
     $this->strCurrentOperation = null;
 }
 /**
  * Create a message dialog. Automatically adds an OK button that closes the dialog. To detect the close,
  * add an action on the QDialog_CloseEvent. To change the message, use the return value and set ->Text.
  * To detect a button click, add a QDialog_ButtonEvent.
  *
  * If you specify no buttons, a close box in the corner will be created that will just close the dialog. If you
  * specify just a string in $strButtons, or just one string in the button array, one button will be shown that will just close the message.
  *
  * If you specify more than one button, the first button will be the default button (the one pressed if the user presses the return key). In
  * this case, you will need to detect the button by adding a QDialog_ButtonEvent. You will also be responsible for calling "Close()" on
  * the dialog after detecting a button.
  *
  * @param QForm $objForm	// The parent object, which should always be the form itself.
  * @param string $strMessage		// The message
  * @param string|string[]|null $strButtons
  * @param string|null $strControlId
  * @return QDialog
  */
 public static function Alert($strMessage, $strButtons = null, $strControlId = null)
 {
     global $_FORM;
     $objForm = $_FORM;
     $dlg = new QDialog($objForm, $strControlId);
     $dlg->Modal = true;
     $dlg->Resizable = false;
     $dlg->Text = $strMessage;
     $dlg->AddAction(new QDialog_CloseEvent(), new QAjaxControlAction($dlg, 'alert_Close'));
     if ($strButtons) {
         $dlg->blnHasCloseButton = false;
         if (is_string($strButtons)) {
             $dlg->AddCloseButton($strButtons);
         } elseif (count($strButtons) == 1) {
             $dlg->AddCloseButton($strButtons[0]);
         } else {
             $strButton = array_shift($strButtons);
             $dlg->AddButton($strButton, null, false, true);
             // primary button
             foreach ($strButtons as $strButton) {
                 $dlg->AddButton($strButton);
             }
         }
     } else {
         $dlg->blnHasCloseButton = true;
         $dlg->Height = 100;
         // fix problem with jquery ui dialog making space for buttons that don't exist
     }
     $dlg->Open();
     return $dlg;
 }