How parent properties work

  1. <?php
  2. /**
  3. *  This file is part of the VCL for PHP project
  4. *
  5. *  Copyright (c) 2004-2008 qadram software S.L. <support@qadram.com>
  6. *
  7. *  Checkout AUTHORS file for more information on the developers
  8. *
  9. *  This library is free software; you can redistribute it and/or
  10. *  modify it under the terms of the GNU Lesser General Public
  11. *  License as published by the Free Software Foundation; either
  12. *  version 2.1 of the License, or (at your option) any later version.
  13. *
  14. *  This library is distributed in the hope that it will be useful,
  15. *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  17. *  Lesser General Public License for more details.
  18. *
  19. *  You should have received a copy of the GNU Lesser General Public
  20. *  License along with this library; if not, write to the Free Software
  21. *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  22. *  USA
  23. *
  24. */
  25.  
  26.  
  27. //Includes
  28. require_once("vcl/vcl.inc.php");
  29. use_unit("forms.inc.php");
  30. use_unit("extctrls.inc.php");
  31. use_unit("stdctrls.inc.php");
  32.  
  33. //Class definition
  34. class Unit3 extends Page
  35. {
  36.    public $btnResetPanelProperties = null;
  37.    public $Memo2 = null;
  38.    public $edtPanelColor = null;
  39.    public $ckbShowHintsOnPanel = null;
  40.    public $Label3 = null;
  41.    public $btnSetPanelColor = null;
  42.    public $Panel3 = null;
  43.    public $Memo1 = null;
  44.    public $Label2 = null;
  45.    public $Panel2 = null;
  46.    public $ckbShowHint = null;
  47.    public $cmbPageFont = null;
  48.    public $edtPageColor = null;
  49.    public $btnChangePageFont = null;
  50.    public $Edit2 = null;
  51.    public $btnChangePageColor = null;
  52.    public $Label1 = null;
  53.    public $Panel1 = null;
  54.    function btnResetPanelPropertiesClick($sender$params)
  55.    {
  56.       $this->Panel3->ParentFont = true;
  57.       $this->Panel3->ParentColor = true;
  58.       $this->Panel3->ParentShowHint = true;
  59.       // uncheck the checkbox not to cause confusions...
  60.       $this->ckbShowHintsOnPanel->Checked = false;
  61.    }
  62.  
  63.    function btnSetPanelColorClick($sender$params)
  64.    {
  65.       $this->Panel3->Color = $this->edtPanelColor->Text;
  66.    }
  67.  
  68.    function ckbShowHintsOnPanelClick($sender$params)
  69.    {
  70.       $this->Panel3->ShowHint = $this->ckbShowHintsOnPanel->Checked;
  71.    }
  72.  
  73.    function ckbShowHintClick($sender$params)
  74.    {
  75.       $this->ShowHint $this->ckbShowHint->Checked;
  76.    }
  77.  
  78.    function btnChangePageFontClick($sender$params)
  79.    {
  80.       switch ($this->cmbPageFont->ItemIndex)
  81.       {
  82.          case "defaultfont":
  83.          {
  84.             $this->Font->family = "Verdana";
  85.             $this->Font->size = "10px";
  86.             $this->Font->color = "";
  87.             $this->Font->weight = "";
  88.             $this->Font->align = "taNone";
  89.             $this->Font->style = "";
  90.             $this->Font->variant = "";
  91.             $this->Font->lineheight = "";
  92.             break;
  93.          }
  94.          case "bold":
  95.             $this->Font->weight = "bold";
  96.             break;
  97.          case "size":
  98.             $this->Font->size = "14px";
  99.             break;
  100.          case "case":
  101.             $this->Foncase caUpperCase;
  102.          break;
  103.    }
  104.       }
  105.  
  106.       function btnChangePageColorClick($sender$params)
  107.       {
  108.          $this->Color $this->edtPageColor->Text;
  109.       }
  110.  
  111.    }
  112.  
  113.    global $application;
  114.  
  115.    global $Unit3;
  116.  
  117.    //Creates the form
  118.    $Unit3 = new Unit3($application);
  119.  
  120.    //Read from resource file
  121.    $Unit3->loadResource(__FILE__);
  122.  
  123.    //Shows the form
  124.    $Unit3->show();
  125.  
  126.    ?>

Documentation generated on Wed, 28 May 2008 19:54:10 +0200 by phpDocumentor 1.4.0a2