示例#1
0
 protected function onConstruct()
 {
     parent::onConstruct();
     $this->text = new Label();
     $this->text->setPosition(2, -17);
     $this->text->enableAutonewline();
     $this->addComponent($this->text);
 }
示例#2
0
 protected function onConstruct()
 {
     parent::onConstruct();
     $this->setBackgroundStyle(Bgs1::BgWindow2);
     $this->text = new Label();
     $this->text->setPosition(2, -17);
     $this->text->enableAutonewline();
     $this->addComponent($this->text);
     $this->options = new Frame(0, 0, new Line());
     $this->options->setHalign('center');
     $this->addComponent($this->options);
 }
 /**
  * Use the static Create method to instanciate
  * a new object of that class.
  */
 protected function onConstruct()
 {
     parent::onConstruct();
     $this->oldSizeX = null;
     $this->oldSizeY = null;
     // create minimize button ...
     $this->buttonMin = new Label();
     $this->buttonMin->setStyle(Label::TextCardRaceRank);
     $this->buttonMin->setPosY(-2.5);
     $this->buttonMin->setText('$000_');
     $this->buttonMin->setAction(ActionHandler::getInstance()->createAction(array(GuiHandler::getInstance(), 'sendToTaskbar')));
     $this->addComponent($this->buttonMin);
     $this->buttonMax = new Icons128x32_1(8);
     $this->buttonMax->setSubStyle(Icons128x32_1::Windowed);
     $this->buttonMax->setPosition(9, -2.5);
     $this->buttonMax->setAction($this->createAction(array($this, 'maximize')));
     $this->addComponent($this->buttonMax);
     $this->setMaximizable(false);
 }