当前位置: 首页>>代码示例>>PHP>>正文


PHP TVBox::add方法代码示例

本文整理汇总了PHP中TVBox::add方法的典型用法代码示例。如果您正苦于以下问题:PHP TVBox::add方法的具体用法?PHP TVBox::add怎么用?PHP TVBox::add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TVBox的用法示例。


在下文中一共展示了TVBox::add方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: TForm

 /**
  * Class constructor
  * Creates the page and the registration form
  */
 function __construct()
 {
     parent::__construct();
     // creates the form
     $this->form = new TForm('form_Customer');
     try {
         // UIBuilder object
         $ui = new TUIBuilder(500, 340);
         $ui->setController($this);
         $ui->setForm($this->form);
         // reads the xml form
         $ui->parseFile('app/forms/customerlist.form.xml');
         $this->datagrid = $ui->getWidget('datagrid1');
         $this->pageNavigation = $this->datagrid->getPageNavigation();
         $this->form->add($ui);
         $this->form->setFields($ui->getFields());
     } catch (Exception $e) {
         new TMessage('error', $e->getMessage());
     }
     // wrap the page content using vertical box
     $vbox = new TVBox();
     $vbox->add(new TXMLBreadCrumb('menu.xml', __CLASS__));
     $vbox->add($this->form);
     parent::add($vbox);
 }
开发者ID:jfrank1500,项目名称:curso_php,代码行数:29,代码来源:DesignedDataGridView.class.php

示例2: __construct

 public function __construct()
 {
     parent::__construct();
     $this->form = new TForm();
     // creates one datagrid
     $this->datagrid = new TQuickGrid();
     $this->datagrid->disableDefaultClick();
     $this->form->add($this->datagrid);
     // creates the action button
     $button1 = new TButton('action1');
     // define the button action
     $action_button1 = new TAction(array($this, 'onUpdate'));
     $action_button1->setParameter('id', filter_input(INPUT_GET, 'id'));
     $button1->setAction($action_button1, 'Atualizar');
     $button1->setImage('fa:check-circle-o green');
     $this->form->addField($button1);
     // add the columns
     $this->datagrid->addQuickColumn('Tipo de Atividade', 'nome', 'left', 180);
     $this->datagrid->addQuickColumn('Ticket', 'ticket', 'left', 180);
     $this->datagrid->addQuickColumn('Sistema', 'sistema', 'left', 180);
     // creates the datagrid model
     $this->datagrid->createModel();
     // wrap the page content using vertical box
     $vbox = new TVBox();
     $vbox->add($button1);
     $vbox->add($this->form);
     parent::add($vbox);
 }
开发者ID:jhonleandres,项目名称:Atividades,代码行数:28,代码来源:TipoAtividadesVinculos.class.php

示例3: TQuickForm

 /**
  * Class constructor
  * Creates the page and the registration form
  */
 function __construct()
 {
     parent::__construct();
     parent::setDatabase('samples');
     // defines the database
     parent::setActiveRecord('City');
     // defines the active record
     // creates the form
     $this->form = new TQuickForm('form_City');
     $this->form->class = 'tform';
     // CSS class
     $this->form->style = 'width: 500px';
     // define the form title
     $this->form->setFormTitle('Standard Form');
     // create the form fields
     $id = new TEntry('id');
     $name = new TEntry('name');
     $id->setEditable(FALSE);
     // add the form fields
     $this->form->addQuickField('ID', $id, 100);
     $this->form->addQuickField('Name', $name, 100);
     // define the form action
     $this->form->addQuickAction('Save', new TAction(array($this, 'onSave')), 'ico_save.png');
     $this->form->addQuickAction('New', new TAction(array($this, 'onEdit')), 'ico_new.png');
     $this->form->addQuickAction('Listing', new TAction(array('StandardDataGridView', 'onReload')), 'ico_datagrid.gif');
     // wrap the page content using vertical box
     $vbox = new TVBox();
     $vbox->add(new TXMLBreadCrumb('menu.xml', __CLASS__));
     $vbox->add($this->form);
     parent::add($vbox);
 }
开发者ID:jfrank1500,项目名称:curso_php,代码行数:35,代码来源:StandardFormView.class.php

示例4: TForm

 /**
  * Class constructor
  */
 function __construct()
 {
     parent::__construct();
     // creates the form
     $this->form = new TForm('form_pdf_shapes');
     // creates a table
     $table = new TTable();
     // add the table inside the form
     $this->form->add($table);
     // create the form fields
     $name = new TEntry('name');
     $name->addValidation('Name', new TRequiredValidator());
     $label = new TLabel('Name' . ': ');
     $label->setFontColor('red');
     $table->addRowSet($label, $name);
     $save_button = new TButton('generate');
     $save_button->setAction(new TAction(array($this, 'onGenerate')), 'Generate');
     $save_button->setImage('ico_save.png');
     // add a row for the form action
     $table->addRowSet($save_button);
     // define wich are the form fields
     $this->form->setFields(array($name, $save_button));
     // wrap the page content using vertical box
     $vbox = new TVBox();
     $vbox->add(new TXMLBreadCrumb('menu.xml', __CLASS__));
     $vbox->add($this->form);
     parent::add($vbox);
 }
开发者ID:jfrank1500,项目名称:curso_php,代码行数:31,代码来源:PDFDesignShapesView.class.php

示例5: __construct

 public function __construct()
 {
     parent::__construct();
     $this->datagrid = new TQuickGrid();
     $this->datagrid->setHeight(320);
     // define the CSS class
     $this->datagrid->class = 'customized-table';
     // import the CSS file
     parent::include_css('app/resources/custom-table.css');
     // add the columns
     $this->datagrid->addQuickColumn('ID', 'id', 'left', 50);
     $this->datagrid->addQuickColumn('Description', 'description', 'left', 250);
     $this->datagrid->addQuickColumn('Amount', 'amount', 'right', 140);
     $this->datagrid->addQuickColumn('Price', 'sale_price', 'right', 140);
     // add the actions
     $this->datagrid->addQuickAction('Delete', new TDataGridAction(array($this, 'onDelete')), 'id', 'ico_delete.png');
     // creates the datagrid model
     $this->datagrid->createModel();
     $form_back = new TQuickForm();
     $form_back->addQuickAction('Back', new TAction(array($this, 'onGoToCatalog')), 'ico_back.png');
     // wrap the page content using vertical box
     $vbox = new TVBox();
     $vbox->add(new TXMLBreadCrumb('menu.xml', 'ProductCatalogView'));
     $vbox->add($this->datagrid);
     $vbox->add($form_back);
     parent::add($vbox);
 }
开发者ID:jfrank1500,项目名称:curso_php,代码行数:27,代码来源:CartManagementView.class.php

示例6: __construct

 /**
  * BancoDataGrid constructor.
  */
 public function __construct()
 {
     parent::__construct();
     parent::setDatabase('sobcontrole');
     parent::setActiveRecord('banco');
     parent::setFilterField('nome');
     parent::setDefaultOrder('nome', 'asc');
     /** @var TQuickForm $this */
     $this->form = new \Adianti\Widget\Wrapper\TQuickForm('BancoDataGrid');
     $this->form->setFormTitle('Cadastro Bancos');
     $this->form->class = 'tform';
     $nome = new \Adianti\Widget\Form\TEntry('nome');
     $this->form->addQuickField('Nome: ', $nome, 250);
     $this->form->addQuickAction('Buscar', new \Adianti\Control\TAction(array($this, 'onSearch')), 'ico_find.png');
     $this->form->addQuickAction('Novo', new \Adianti\Control\TAction(array('BancoFormView', 'onClear')), 'ico_new.png');
     $this->form->setData(\Adianti\Registry\TSession::getValue('banco_filtro'));
     $this->datagrid = new \Adianti\Widget\Wrapper\TQuickGrid();
     $this->datagrid->style = 'width: 100%';
     $this->datagrid->setHeight(300);
     $this->datagrid->addQuickColumn('ID', 'idbanco', 'right', 50, new \Adianti\Control\TAction(array($this, 'onReload')), array('order', 'idbanco'));
     $this->datagrid->addQuickColumn('Nome', 'nome', 'right', 250, new \Adianti\Control\TAction(array($this, 'onReload')), array('order', 'nome'));
     $this->datagrid->addQuickColumn('Sigla', 'sigla', 'right', 100, new \Adianti\Control\TAction(array($this, 'onReload')), array('order', 'sigla'));
     $this->datagrid->addQuickAction('Editar', new \Adianti\Widget\Datagrid\TDataGridAction(array('BancoFormView', 'onEdit')), 'idbanco', 'ico_edit.png');
     $this->datagrid->addQuickAction('Excluir', new \Adianti\Widget\Datagrid\TDataGridAction(array($this, 'onDelete')), 'idbanco', 'ico_delete.png');
     $this->datagrid->createModel();
     $this->pageNavigation = new \Adianti\Widget\Datagrid\TPageNavigation();
     $this->pageNavigation->setAction(new \Adianti\Control\TAction(array($this, 'onReload')));
     $this->pageNavigation->setWidth($this->datagrid->getWidth());
     $vbox = new TVBox();
     $vbox->add(new \Adianti\Widget\Util\TXMLBreadCrumb('menu.xml', 'BancoFormView'));
     $vbox->add($this->form);
     $vbox->add($this->datagrid);
     $vbox->add($this->pageNavigation);
     parent::add($vbox);
 }
开发者ID:edurbs,项目名称:sobcontrole,代码行数:38,代码来源:BancoDataGrid.class.php

示例7: __construct

 public function __construct()
 {
     parent::__construct();
     // creates one datagrid
     $this->datagrid = new TDataGrid();
     // create the datagrid columns
     $code = new TDataGridColumn('code', 'Code', 'right', 70);
     $name = new TDataGridColumn('name', 'Name', 'left', 180);
     $address = new TDataGridColumn('address', 'Address', 'left', 180);
     $telephone = new TDataGridColumn('fone', 'Phone', 'left', 160);
     // add the columns to the datagrid
     $this->datagrid->addColumn($code);
     $this->datagrid->addColumn($name);
     $this->datagrid->addColumn($address);
     $this->datagrid->addColumn($telephone);
     // creates two datagrid actions
     $action1 = new TDataGridAction(array($this, 'onView'));
     $action1->setLabel('View');
     $action1->setImage('ico_find.png');
     $action1->setField('name');
     $action1->setDisplayCondition(array($this, 'displayColumn'));
     // add the actions to the datagrid
     $this->datagrid->addAction($action1);
     // creates the datagrid model
     $this->datagrid->createModel();
     // wrap the page content using vertical box
     $vbox = new TVBox();
     $vbox->add(new TXMLBreadCrumb('menu.xml', __CLASS__));
     $vbox->add($this->datagrid);
     parent::add($vbox);
 }
开发者ID:jfrank1500,项目名称:curso_php,代码行数:31,代码来源:DatagridConditionalActionView.class.php

示例8: TTable

 /**
  * Class constructor
  * Creates the page
  */
 function __construct()
 {
     parent::__construct();
     // loads the galleria javascript library
     TPage::include_js('app/lib/jquery/galleria/galleria-1.2.2.min.js');
     // creates a table
     $table = new TTable();
     // creates the DIV element with the images
     $galleria = new TElement('div');
     $galleria->id = 'images';
     $galleria->style = "width:600px;height:460px";
     for ($n = 1; $n <= 4; $n++) {
         $img = new TElement('img');
         $img->src = "app/images/nature/nature{$n}.jpg";
         $galleria->add($img);
     }
     // add the DIV to the table
     $table->addRow()->addCell($galleria);
     // creates the script element
     $script = new TElement('script');
     $script->type = 'text/javascript';
     $script->add('
         Galleria.loadTheme("app/lib/jquery/galleria/themes/classic/galleria.classic.min.js");
         $("#images").galleria();
     ');
     // add the script to the table
     $table->addRow()->addCell($script);
     // wrap the page content using vertical box
     $vbox = new TVBox();
     $vbox->add(new TXMLBreadCrumb('menu.xml', __CLASS__));
     $vbox->add($table);
     parent::add($vbox);
 }
开发者ID:jfrank1500,项目名称:curso_php,代码行数:37,代码来源:JqueryGalleryView.class.php

示例9: TQuickForm

 /**
  * Class constructor
  * Creates the page
  */
 function __construct()
 {
     parent::__construct();
     // create the form using TQuickForm class
     $this->form = new TQuickForm('form_dynamic_filter');
     // create the notebook
     $notebook = new TNotebook(530, 160);
     // adds the notebook page
     $notebook->appendPage('Dynamic filtering', $this->form);
     $check_gender = new TCheckGroup('check_gender');
     $check_gender->addItems(array('M' => 'Male', 'F' => 'Female'));
     $check_gender->setLayout('horizontal');
     $combo_status = new TCombo('combo_status');
     $combo_status->addItems(array('S' => 'Single', 'C' => 'Committed', 'M' => 'Married'));
     $combo_customers = new TCombo('customers');
     // add the fields inside the form
     $this->form->addQuickField('Load customers: ', $check_gender, 200);
     $this->form->addQuickField('', $combo_status, 200);
     $this->form->addQuickField('', $combo_customers, 200);
     $check_gender->setChangeAction(new TAction(array($this, 'onGenderChange')));
     $combo_status->setChangeAction(new TAction(array($this, 'onGenderChange')));
     // wrap the page content using vertical box
     $vbox = new TVBox();
     $vbox->add(new TXMLBreadCrumb('menu.xml', __CLASS__));
     $vbox->add($notebook);
     parent::add($vbox);
 }
开发者ID:jfrank1500,项目名称:curso_php,代码行数:31,代码来源:FormDynamicFilterView.class.php

示例10: __construct

 public function __construct()
 {
     parent::__construct();
     // creates one datagrid
     $this->datagrid = new TDataGrid();
     // make scrollable and define height
     $this->datagrid->setHeight(300);
     $this->datagrid->makeScrollable();
     // create the datagrid columns
     $code = new TDataGridColumn('code', 'Code', 'right', 70);
     $name = new TDataGridColumn('name', 'Name', 'left', 180);
     $address = new TDataGridColumn('address', 'Address', 'left', 180);
     $telephone = new TDataGridColumn('fone', 'Phone', 'left', 160);
     // add the columns to the datagrid
     $this->datagrid->addColumn($code);
     $this->datagrid->addColumn($name);
     $this->datagrid->addColumn($address);
     $this->datagrid->addColumn($telephone);
     // creates the datagrid model
     $this->datagrid->createModel();
     // wrap the page content using vertical box
     $vbox = new TVBox();
     $vbox->add(new TXMLBreadCrumb('menu.xml', __CLASS__));
     $vbox->add($this->datagrid);
     parent::add($vbox);
 }
开发者ID:jfrank1500,项目名称:curso_php,代码行数:26,代码来源:DatagridScrollView.class.php

示例11: TQuickForm

 function __construct()
 {
     parent::__construct();
     // create the form using TQuickForm class
     $this->form = new TQuickForm();
     $this->form->class = 'tform';
     $this->form->setFormTitle('Formas de Pagamentos');
     $combo = new TCombo('pagamento');
     $combo_items = array();
     $combo_items['a'] = 'Cartão de Crédito Visa';
     $combo_items['b'] = 'Cartão de Crédito Mastercard';
     $combo_items['c'] = 'Ticket Vale Refeição';
     $combo_items['d'] = 'PagSeguro';
     $combo_items['e'] = 'PayPal';
     $combo_items['f'] = 'DriverCoins';
     $combo->addItems($combo_items);
     $this->form->addQuickField('Forma de Pagamentos', $combo, 500);
     $this->form->addQuickAction('Salvar', new TAction(array($this, 'onSave')), 'ico_save.png');
     // wrap the page content using vertical box
     $vbox = new TVBox();
     $vbox->style = 'width: 100%';
     $vbox->add(new TXMLBreadCrumb('menu.xml', __CLASS__));
     $vbox->add($this->form);
     parent::add($vbox);
 }
开发者ID:dtgfranca,项目名称:web,代码行数:25,代码来源:PagamentosForm.class.php

示例12: TForm

 /**
  * Class constructor
  * Creates the page and the registration form
  */
 function __construct()
 {
     parent::__construct();
     // creates the form
     $this->form = new TForm();
     try {
         // UIBuilder object
         $ui = new TUIBuilder(500, 300);
         $ui->setController($this);
         $ui->setForm($this->form);
         // reads the xml form
         $ui->parseFile('app/forms/sample.form.xml');
         // add the TUIBuilder panel inside the form
         $this->form->add($ui);
         // set the form fields from the interface
         $this->form->setFields($ui->getFields());
     } catch (Exception $e) {
         new TMessage('error', $e->getMessage());
     }
     // wrap the page content using vertical box
     $vbox = new TVBox();
     $vbox->add(new TXMLBreadCrumb('menu.xml', __CLASS__));
     $vbox->add($this->form);
     parent::add($vbox);
 }
开发者ID:jfrank1500,项目名称:curso_php,代码行数:29,代码来源:DesignFormView.class.php

示例13: TForm

 /**
  * Class constructor
  * Creates the page
  */
 function __construct()
 {
     parent::__construct();
     $this->form = new TForm();
     $list1 = new TSortList('list1');
     $list2 = new TSortList('list2');
     $list1->addItems(array('1' => 'One', '2' => 'Two', '3' => 'Three'));
     $list2->addItems(array('a' => 'A', 'b' => 'B', 'c' => 'C'));
     $list1->setSize(200, 100);
     $list2->setSize(200, 100);
     $list1->connectTo($list2);
     $list2->connectTo($list1);
     // creates the action button
     $button1 = new TButton('action1');
     $button1->setAction(new TAction(array($this, 'onSave')), 'Save');
     $button1->setImage('ico_save.png');
     $table = new TTable();
     $row = $table->addRow();
     $row->addCell($list1);
     $row->addCell($list2);
     $table->addRow()->addCell($button1);
     $this->form->setFields(array($list1, $list2, $button1));
     $this->form->add($table);
     // wrap the page content using vertical box
     $vbox = new TVBox();
     $vbox->add(new TXMLBreadCrumb('menu.xml', __CLASS__));
     $vbox->add($this->form);
     parent::add($vbox);
 }
开发者ID:jfrank1500,项目名称:curso_php,代码行数:33,代码来源:FormSortView.class.php

示例14: __construct

 public function __construct()
 {
     parent::__construct();
     // creates one datagrid
     $this->datagrid = new TQuickGrid();
     $this->datagrid->setHeight(320);
     // add the columns
     $this->datagrid->addQuickColumn('Code', 'code', 'right', 200);
     $this->datagrid->addQuickColumn('Name', 'name', 'left', 400);
     // add the actions
     $this->datagrid->addQuickAction('Delete', new TDataGridAction(array($this, 'onDelete')), 'code', 'ico_delete.png');
     // creates the datagrid model
     $this->datagrid->createModel();
     $this->form = new TQuickForm('over_form');
     $this->form->class = 'tform';
     $this->form->setFormTitle('Add items');
     $this->form->addQuickAction('Add', new TAction(array('NewWindowForm', 'onLoad')), 'ico_add.png');
     // wrap the page content using vertical box
     $vbox = new TVBox();
     $vbox->add(new TXMLBreadCrumb('menu.xml', __CLASS__));
     $vbox->add($this->datagrid);
     $vbox->add('&nbsp;');
     $vbox->add($this->form);
     parent::add($vbox);
 }
开发者ID:jfrank1500,项目名称:curso_php,代码行数:25,代码来源:DatagridWindowForm.class.php

示例15: TScroll

 /**
  * Class constructor
  * Creates the page
  */
 function __construct()
 {
     parent::__construct();
     // creates the scroll panel
     $scroll = new TScroll();
     $scroll->setSize(400, 300);
     // creates a table for the fields
     $fields_table = new TTable();
     // adds the table inside the scroll
     $scroll->add($fields_table);
     // create the form fields
     $fields = array();
     for ($n = 1; $n <= 20; $n++) {
         $object = new TEntry('field' . $n);
         $fields[$n] = $object;
         // adds a row for each form field
         $row = $fields_table->addRow();
         $row->addCell(new TLabel('Field:' . $n));
         $row->addCell($object);
     }
     // wrap the page content using vertical box
     $vbox = new TVBox();
     $vbox->add(new TXMLBreadCrumb('menu.xml', __CLASS__));
     $vbox->add($scroll);
     parent::add($vbox);
 }
开发者ID:jfrank1500,项目名称:curso_php,代码行数:30,代码来源:ContainerScrollView.class.php


注:本文中的TVBox::add方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。