本文整理汇总了PHP中TEntry::setTip方法的典型用法代码示例。如果您正苦于以下问题:PHP TEntry::setTip方法的具体用法?PHP TEntry::setTip怎么用?PHP TEntry::setTip使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TEntry
的用法示例。
在下文中一共展示了TEntry::setTip方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: makeTEntry
/**
*
*/
public function makeTEntry($properties)
{
$widget = new TEntry((string) $properties->{'name'});
$widget->setValue((string) $properties->{'value'});
$widget->setMask((string) $properties->{'mask'});
$widget->setSize((int) $properties->{'width'});
if (isset($properties->{'maxlen'})) {
$widget->setMaxLength((int) $properties->{'maxlen'});
}
if (isset($properties->{'tip'})) {
$widget->setTip((string) $properties->{'tip'});
}
if (isset($properties->{'required'}) and $properties->{'required'} == '1') {
$widget->addValidation((string) $properties->{'name'}, new TRequiredValidator());
}
$widget->setEditable((string) $properties->{'editable'});
$this->fields[] = $widget;
$this->fieldsByName[(string) $properties->{'name'}] = $widget;
return $widget;
}
示例2: THtmlRenderer
/**
* Class constructor
* Creates the page
*/
function __construct()
{
parent::__construct();
// load the styles
TPage::include_css('app/resources/formdecorator.css');
// create the HTML Renderer
$html = new THtmlRenderer('app/resources/formdecorator.html');
// create the form using TQuickForm class
$this->form = new TQuickForm();
// create the form fields
$id = new TEntry('id');
$description = new TEntry('description');
$date = new TDate('date');
$time = new TEntry('time');
$number = new TEntry('number');
$text = new TText('text');
$description->setTip('Type the description here...');
$date->setMask('dd/mm/yyyy');
// define date mask
$time->setMask('99:99');
$number->setNumericMask(2, ',', '.');
// define numeric input
// add the fields inside the form
$this->form->addQuickField('Id', $id, 40);
$this->form->addQuickField('Description', $description, 200);
$this->form->addQuickField('Date (dd/mm/yyyy)', $date, 80);
$this->form->addQuickField('Time (99:99)', $time, 60);
$this->form->addQuickField('Numeric Input (9.999,99)', $number, 100);
$this->form->addQuickField('Text', $text, 120);
$text->setSize(200, 100);
// define the form action
$this->form->addQuickAction('Save', new TAction(array($this, 'onSave')), 'ico_save.png');
// replace the main section variables
$replace = array('form' => $this->form);
$html->enableSection('main', $replace);
// wrap the page content using vertical box
$vbox = new TVBox();
$vbox->add(new TXMLBreadCrumb('menu.xml', __CLASS__));
$vbox->add($html);
parent::add($vbox);
}
示例3: TNotebook
/**
* Class constructor
* Creates the page
*/
function __construct()
{
parent::__construct();
// create the notebook
$notebook = new TNotebook(620, 340);
// create the form
$this->form = new TForm();
// creates the notebook page
$table = new TTable();
// add the notebook inside the form
$this->form->add($table);
// adds the notebook page
$notebook->appendPage('Input elements', $this->form);
// create the form fields
$field1 = new TEntry('field1');
$field2 = new TEntry('field2');
$field3 = new TEntry('field3');
$field4 = new TEntry('field4');
$field5 = new TPassword('field5');
$field6 = new TDate('field6');
$field7 = new TSpinner('field7');
$field8 = new TSlider('field8');
$field9 = new TText('field9');
$field1->setTip('Tip for field 1');
$field2->setTip('Tip for field 2');
$field3->setTip('Tip for field 3');
$field4->setTip('Tip for field 4');
$field5->setTip('Tip for field 5');
$field6->setTip('Tip for field 6');
$field7->setTip('Tip for field 7');
$field8->setTip('Tip for field 8');
$field9->setTip('Tip for field 9');
$field2->setValue('123');
$field2->setEditable(FALSE);
$field3->setMask('99.999-999');
$field4->setMaxLength(10);
$field6->setSize(100);
$field7->setRange(0, 100, 10);
$field8->setRange(0, 100, 10);
$field7->setValue(30);
$field8->setValue(50);
$field9->setSize(300, 50);
// add rows for the fields
$table->addRowSet(new TLabel('TEntry object:'), $field1);
$table->addRowSet(new TLabel('TEntry not editable:'), $field2);
$table->addRowSet(new TLabel('TEntry with mask:'), $field3, new TLabel('99.999-999'));
$table->addRowSet(new TLabel('TEntry with maxlength (10):'), $field4);
$table->addRowSet(new TLabel('TPassword object:'), $field5);
$table->addRowSet(new TLabel('TDate Object:'), $field6);
$table->addRowSet(new TLabel('Spinner Object:'), $field7);
$table->addRowSet(new TLabel('Slider Object:'), $field8);
$table->addRowSet(new TLabel('TText Object:'), $field9);
// creates the action button
$button1 = new TButton('action1');
// define the button action
$button1->setAction(new TAction(array($this, 'onSave')), 'Save');
$button1->setImage('ico_save.png');
// define wich are the form fields
$this->form->setFields(array($field1, $field2, $field3, $field4, $field5, $field6, $field7, $field8, $field9, $button1));
// add a row for the button
$row = $table->addRow();
$row->addCell($button1);
// wrap the page content using vertical box
$vbox = new TVBox();
$vbox->add(new TXMLBreadCrumb('menu.xml', __CLASS__));
$vbox->add($notebook);
parent::add($vbox);
}
示例4: TNotebook
/**
* Class constructor
* Creates the page
*/
function __construct()
{
parent::__construct();
// create the notebook
$notebook = new TNotebook(620, 410);
// create the form
$this->form = new TForm();
// creates the notebook page
$table = new TTable();
// add the notebook inside the form
$this->form->add($table);
// adds the notebook page
$notebook->appendPage('Input elements', $this->form);
// create the form fields
$field1 = new TEntry('field1');
$field2 = new TEntry('field2');
$field3 = new TEntry('field3');
$field4 = new TEntry('field4');
$field5 = new TEntry('field5');
$field6 = new TPassword('field6');
$field7 = new TDate('field7');
$field8 = new TSpinner('field8');
$field9 = new TSlider('field9');
$field10 = new TText('field10');
$field1->setTip('Tip for field 1');
$field2->setTip('Tip for field 2');
$field3->setTip('Tip for field 3');
$field4->setTip('Tip for field 4');
$field5->setTip('Tip for field 5');
$field6->setTip('Tip for field 6');
$field7->setTip('Tip for field 7');
$field8->setTip('Tip for field 8');
$field9->setTip('Tip for field 9');
$field10->setTip('Tip for field 10');
$field2->setValue('123');
$field2->setEditable(FALSE);
$field3->setMask('99.999-999');
$field4->setMaxLength(10);
$field5->setCompletion(array('Allen', 'Albert', 'Alberto', 'Alladin'));
$field7->setSize(100);
$field8->setRange(0, 100, 10);
$field9->setRange(0, 100, 10);
$field8->setValue(30);
$field9->setValue(50);
$field10->setSize(300, 80);
// add a row for one field
$row = $table->addRow();
$row->addCell(new TLabel('TEntry object:'));
$cell = $row->addCell($field1);
// add a row for one field
$row = $table->addRow();
$row->addCell(new TLabel('TEntry not editable:'));
$cell = $row->addCell($field2);
// add a row for one field
$row = $table->addRow();
$row->addCell(new TLabel('TEntry with mask:'));
$cell = $row->addCell($field3);
$cell = $row->addCell(new TLabel('99.999-999'));
// add a row for one field
$row = $table->addRow();
$row->addCell(new TLabel('TEntry with maxlength (10):'));
$cell = $row->addCell($field4);
// add a row for one field
$row = $table->addRow();
$row->addCell(new TLabel('TEntry with completion (a..):'));
$cell = $row->addCell($field5);
// add a row for one field
$row = $table->addRow();
$row->addCell(new TLabel('TPassword object:'));
$cell = $row->addCell($field6);
// add a row for one field
$row = $table->addRow();
$row->addCell(new TLabel('TDate Object:'));
$cell = $row->addCell($field7);
// add a row for one field
$row = $table->addRow();
$row->addCell(new TLabel('Spinner Object:'));
$cell = $row->addCell($field8);
// add a row for one field
$row = $table->addRow();
$row->addCell(new TLabel('Slider Object:'));
$cell = $row->addCell($field9);
// add a row for one field
$row = $table->addRow();
$row->addCell(new TLabel('TText Object:'));
$cell = $row->addCell($field10);
// creates the action button
$button1 = new TButton('action1');
// define the button action
$button1->setAction(new TAction(array($this, 'onSave')), 'Save');
$button1->setImage('ico_save.png');
// define wich are the form fields
$this->form->setFields(array($field1, $field2, $field3, $field4, $field5, $field6, $field7, $field8, $field9, $field10, $button1));
// add a row for the button
$row = $table->addRow();
$row->addCell($button1);
//.........这里部分代码省略.........
示例5: TForm
/**
* Class constructor
* Creates the page and the registration form
*/
function __construct()
{
parent::__construct();
// creates the form
$this->form = new TForm('form_crm');
// creates a table
// $table = new TTable;
$panel = new TPanel(100, 10);
// add the notebook inside the form
$this->form->add($panel);
$panel->put(new TLabel('CRM Titulo:'), 0, 0);
// $notebook->appendPage('Cidade', $table_contact);
// $notebook->appendPage('Skill (aggregation)', $table_skill);
// create the form fields
$code = new TEntry('id');
// $crm_id = new TDBCombo('crm_id', 'db_crmbf', 'CRM', 'id', 'titulo');
$crm_id = new TEntry('crm_nome');
$tiporegistro_id = new TDBCombo('tiporegistro_id', 'db_crmbf', 'RegistroTipo', 'id', 'nome');
$registro = new TText('registro');
$temporegistro = new TEntry('tempo_registro');
// $temporegistro->setEditable(false);
$dataregistro = new TDate('data_registro');
$hora_registro = new TEntry('hora_registro');
$numero_registro = new TEntry('numero_registro');
// add field validators
$registro->addValidation('Nome', new TRequiredValidator());
// $cidade_id->addValidation('Cidade', new TRequiredValidator);
// $birthdate->addValidation('Birthdate', new TRequiredValidator);
// $cidade_id->addValidation('Category', new TRequiredValidator);
//$obj = new CidadeFormList;
//$cidade_id->setAction(new TAction(array($obj, 'onReload')));
// $itemGender = array();
// $itemGender['M'] = 'Male';
// $itemGender['F'] = 'Female';
// // add the combo options
// $gender->addItems($itemGender);
// $gender->setLayout('horizontal');
//
// $itemStatus = array();
// $itemStatus['S'] = 'Single';
// $itemStatus['C'] = 'Committed';
// $itemStatus['M'] = 'Married';
// $status->addItems($itemStatus);
// define some properties for the form fields
$code->setEditable(FALSE);
$code->setSize(100);
$crm_id->setSize(320);
$registro->setSize(320);
$temporegistro->setSize(160);
//$temporegistro->setValue(date("d/m/Y H:i:s"));
$tiporegistro_id->setSize(160);
//$dataregistro->setRange(0,1000,1);
$dataregistro->setSize(90);
// $hora_registro->setRange(0,100,1);
$hora_registro->setSize(150);
$hora_registro->setTip('Horario EX: 8:14');
$numero_registro->setSize(320);
$panel->put("Codigo: ", 10, 25);
$panel->put("CRM: ", 10, 50);
$panel->put("Tipo: ", 10, 75);
$panel->put("Tempo: ", 10, 100);
$panel->put("Data: ", 10, 125);
$panel->put("Horario: ", 10, 150);
$panel->put("Nº Registro: ", 10, 175);
$panel->put("Registro: ", 10, 200);
$panel->put($code, 100, 25);
$panel->put($crm_id, 100, 50);
$panel->put($tiporegistro_id, 100, 75);
$panel->put($temporegistro, 100, 100);
$panel->put($dataregistro, 100, 125);
$panel->put($hora_registro, 100, 150);
$panel->put($numero_registro, 100, 175);
$panel->put($registro, 100, 200);
// $row = $table->addRow();
// $row->addCell(new TLabel('Code:'));
// $row->addCell($code);
//
// // add a row for the field name
// $row = $table->addRow();
// $row->addCell(new TLabel('CRM Titulo:'));
// $cell = $row->addCell($crm_id);
//
// // add a row for the field Telefone
// $row = $table->addRow();
// $row->addCell(new TLabel('Tipo Registro:'));
// $cell = $row->addCell($tiporegistro_id);
//
// // add a row for the field Email
// $row = $table->addRow();
// $row->addCell(new TLabel('Tempo:'));
// $cell = $row->addCell($temporegistro);
//
// // add a row for the field celular
// $row = $table->addRow();
// $row->addCell(new TLabel('Data:'));
// $cell = $row->addCell($dataregistro);
//.........这里部分代码省略.........
示例6: TForm
/**
* Class constructor
* Creates the page and the registration form
*/
function __construct()
{
parent::__construct();
// creates the form
$this->form = new TForm('form_crm');
// creates a table
$table = new TTable();
$notebook = new TNotebook(500, 320);
// add the notebook inside the form
$this->form->add($notebook);
$notebook->appendPage('Cadastro Registro CRM', $table);
// create the form fields
$code = new TEntry('id');
$crm_id = new TCombo('crm_id');
$tiporegistro_id = new TDBCombo('tiporegistro_id', 'db_crmbf', 'RegistroTipo', 'id', 'nome');
$registro = new TText('registro');
$temporegistro = new TEntry('tempo_registro');
// $temporegistro->setEditable(false);
$dataregistro = new TDate('data_registro');
$hora_registro = new TEntry('hora_registro');
$numero_registro = new TEntry('numero_registro');
// finaliza a transacao
TTransaction::close();
$items1 = array();
//dados do cliente CRM
TTransaction::open('db_crmbf');
$criteria = new TCriteria();
$criteria->add(new TFilter('cliente_id', '=', $_GET['fk']));
$repository = new TRepository('CRM');
$cadastros = $repository->load($criteria);
//adiciona os objetos no combo
foreach ($cadastros as $object) {
$items1[$object->id] = $object->titulo;
}
// adiciona as opcoes na combo
$crm_id->addItems($items1);
TTransaction::close();
// add field validators
$registro->addValidation('Registro deve ser informado', new TRequiredValidator());
// define some properties for the form fields
$code->setEditable(FALSE);
$code->setSize(100);
$crm_id->setSize(320);
// $crm_id->setEditable(FALSE);
$registro->setSize(320);
$temporegistro->setSize(160);
$temporegistro->setValue(date("d/m/Y H:i:s"));
$tiporegistro_id->setSize(160);
$dataregistro->setSize(90);
$hora_registro->setSize(150);
$hora_registro->setTip('Horario EX: 8:14');
$numero_registro->setSize(320);
$row = $table->addRow();
$row->addCell(new TLabel('Code:'));
$row->addCell($code);
// add a row for the field name
$row = $table->addRow();
$row->addCell(new TLabel('CRM Titulo:'));
$cell = $row->addCell($crm_id);
// add a row for the field Telefone
$row = $table->addRow();
$row->addCell(new TLabel('Tipo Registro:'));
$cell = $row->addCell($tiporegistro_id);
// add a row for the field Email
$row = $table->addRow();
$row->addCell(new TLabel('Tempo:'));
$cell = $row->addCell($temporegistro);
// add a row for the field celular
$row = $table->addRow();
$row->addCell(new TLabel('Data:'));
$cell = $row->addCell($dataregistro);
// add a row for the field skype
$row = $table->addRow();
$row->addCell(new TLabel('Hora:'));
$cell = $row->addCell($hora_registro);
// add a row for the field endereco
$row = $table->addRow();
$row->addCell(new TLabel('Numero Registro:'));
$row->addCell($numero_registro);
// add a row for the field name
$row = $table->addRow();
$row->addCell(new TLabel('Registro:'));
$cell = $row->addCell($registro);
// create an action button
$button1 = new TButton('action1');
$button1->setAction(new TAction(array($this, 'onSave')), 'Save');
$button1->setImage('ico_save.png');
// create an action button
$button2 = new TButton('action3');
$action2 = new TAction(array('ClienteRegistroDetalhe', 'onEdit'));
//parametro fk e key da sessao
$action2->setParameter('fk', TSession::getValue('cliente_fk'));
$action2->setParameter('key', TSession::getValue('crm_key'));
$button2->setImage('ico_datagrid.png');
$button2->setAction($action2, 'Voltar');
// define wich are the form fields
//.........这里部分代码省略.........
示例7: TForm
/**
* Class constructor
* Creates the page and the registration form
*/
function __construct()
{
parent::__construct();
// creates the form
$this->form = new TForm('form_clienteRegistro Detalhe');
// creates a table
$table = new TTable();
$panel = new TPanel(480, 260);
$notebook = new TNotebook(500, 250);
// add the notebook inside the form
$this->form->add($notebook);
// add the notebook inside the form
$this->form->add($table);
// create the form fields
$city_id2 = new TSeekButton('city_id2');
$city_name2 = new TEntry('city_name2');
$city_id2->setSize(100);
$city_name2->setEditable(FALSE);
//dados do cliente CRM
TTransaction::open('db_crmbf');
$criteria = new TCriteria();
$criteria->add(new TFilter('cliente_id', '=', $_GET['key']));
//
$repository = new TRepository('CRM');
$CRM = $repository->load($criteria);
foreach ($CRM as $crms) {
$codigoCRM = $crms->id;
$tituloCRM = $crms->titulo;
$projetoCRM = $crms->projeto_nome;
$dataCRM = $crms->data_crm;
$tempoCRM = $crms->tempo;
$porcentagemCRM = $crms->porcentagem;
$descricaoCRM = $crms->descricao;
$solicitanteCRM = $crms->solicitante;
$usuarioalteracaoCRM = $crms->usuarioalteracao;
$responsavel_nomeCRM = $crms->responsavel_nome;
$tipo_nomeCRM = $crms->tipo_nome;
$cliente_nomeCRM = $crms->cliente_nome;
$prioridade_nomeCRM = $crms->prioridade_nome;
$status_nomeCRM = $crms->status_nome;
}
TTransaction::close();
$notebook->appendPage('Registros CRMs', $table);
$code = new TEntry('id');
$crm_id = new TDBCombo('crm_id', 'db_crmbf', 'CRM', 'id', 'titulo');
$tiporegistro_id = new TDBCombo('tiporegistro_id', 'db_crmbf', 'RegistroTipo', 'id', 'nome');
$registro = new TText('registro');
$temporegistro = new TEntry('tempo_registro');
// $temporegistro->setEditable(false);
$dataregistro = new TDate('data_registro');
$hora_registro = new TEntry('hora_registro');
$numero_registro = new TEntry('numero_registro');
// define some properties for the form fields
$code->setEditable(FALSE);
$code->setSize(100);
$crm_id->setSize(320);
$crm_id->setEditable(FALSE);
$registro->setSize(320);
$temporegistro->setSize(160);
//$temporegistro->setValue(date("d/m/Y H:i:s"));
$tiporegistro_id->setSize(160);
//$dataregistro->setRange(0,1000,1);
$dataregistro->setSize(90);
// $hora_registro->setRange(0,100,1);
$hora_registro->setSize(150);
$hora_registro->setTip('Horario EX: 8:14');
$numero_registro->setSize(320);
$row = $table->addRow();
$row->addCell(new TLabel('Code:'));
$row->addCell($code);
// add a row for the field name
$row = $table->addRow();
$row->addCell(new TLabel('CRM Titulo:'));
$cell = $row->addCell($crm_id);
// add a row for the field Telefone
$row = $table->addRow();
$row->addCell(new TLabel('Tipo Registro:'));
$cell = $row->addCell($tiporegistro_id);
// add a row for the field Email
$row = $table->addRow();
$row->addCell(new TLabel('Tempo:'));
$cell = $row->addCell($temporegistro);
// add a row for the field celular
$row = $table->addRow();
$row->addCell(new TLabel('Data:'));
$cell = $row->addCell($dataregistro);
// add a row for the field skype
$row = $table->addRow();
$row->addCell(new TLabel('Hora:'));
$cell = $row->addCell($hora_registro);
// add a row for the field endereco
$row = $table->addRow();
$row->addCell(new TLabel('Numero Registro:'));
$row->addCell($numero_registro);
// add a row for the field name
$row = $table->addRow();
//.........这里部分代码省略.........
示例8: __construct
/**
* constructor method
*/
public function __construct()
{
parent::__construct();
new TSession();
// creates the form
$this->form = new TForm('form_city_Seek');
// creates the table
$table = new TTable();
// add the table inside the form
$this->form->add($table);
// create the form fields
$name = new TEntry('name');
$code = new TEntry('id');
$crm_id = new TDBCombo('crm_id', 'db_crmbf', 'CRM', 'id', 'titulo');
$tiporegistro_id = new TDBCombo('tiporegistro_id', 'db_crmbf', 'RegistroTipo', 'id', 'nome');
$registro = new TText('registro');
$temporegistro = new TEntry('tempo_registro');
// $temporegistro->setEditable(false);
$dataregistro = new TDate('data_registro');
$hora_registro = new TEntry('hora_registro');
$numero_registro = new TEntry('numero_registro');
// keep the session value
// $name->setValue(TSession::getValue('test_city_name'));
// add the field inside the table
// $row=$table->addRow();
// $row->addCell(new TLabel('Name:'));
// $row->addCell($name);
$code->setEditable(FALSE);
$code->setSize(100);
$crm_id->setSize(320);
$registro->setSize(320);
$temporegistro->setSize(160);
//$temporegistro->setValue(date("d/m/Y H:i:s"));
$tiporegistro_id->setSize(160);
//$dataregistro->setRange(0,1000,1);
$dataregistro->setSize(90);
// $hora_registro->setRange(0,100,1);
$hora_registro->setSize(150);
$hora_registro->setTip('Horario EX: 8:14');
$numero_registro->setSize(320);
$row = $table->addRow();
$row->addCell(new TLabel('Code:'));
$row->addCell($code);
// add a row for the field name
$row = $table->addRow();
$row->addCell(new TLabel('CRM Titulo:'));
$cell = $row->addCell($crm_id);
// add a row for the field Telefone
$row = $table->addRow();
$row->addCell(new TLabel('Tipo Registro:'));
$cell = $row->addCell($tiporegistro_id);
// add a row for the field Email
$row = $table->addRow();
$row->addCell(new TLabel('Tempo:'));
$cell = $row->addCell($temporegistro);
// add a row for the field celular
$row = $table->addRow();
$row->addCell(new TLabel('Data:'));
$cell = $row->addCell($dataregistro);
// add a row for the field skype
$row = $table->addRow();
$row->addCell(new TLabel('Hora:'));
$cell = $row->addCell($hora_registro);
// add a row for the field endereco
$row = $table->addRow();
$row->addCell(new TLabel('Numero Registro:'));
$row->addCell($numero_registro);
// add a row for the field name
$row = $table->addRow();
$row->addCell(new TLabel('Registro:'));
$cell = $row->addCell($registro);
// create a find button
$find_button = new TButton('search');
// define the button action
$find_button->setAction(new TAction(array($this, 'onSearch')), 'Search');
$find_button->setImage('ico_find.png');
// add a row for the find button
$row = $table->addRow();
$row->addCell($find_button);
// define wich are the form fields
$this->form->setFields(array($name, $find_button));
// create the datagrid
$this->datagrid = new TDataGrid();
// create the datagrid columns
$id = new TDataGridColumn('id', 'Id', 'right', 70);
$name = new TDataGridColumn('name', 'Name', 'left', 220);
$state = new TDataGridColumn('state', 'Estado', 'left', 80);
$order1 = new TAction(array($this, 'onReload'));
$order2 = new TAction(array($this, 'onReload'));
$order1->setParameter('order', 'id');
$order2->setParameter('order', 'name');
// define the column actions
$id->setAction($order1);
$name->setAction($order2);
// add the columns inside the datagrid
$this->datagrid->addColumn($id);
$this->datagrid->addColumn($name);
//.........这里部分代码省略.........