本文整理汇总了PHP中Entry::setEnabled方法的典型用法代码示例。如果您正苦于以下问题:PHP Entry::setEnabled方法的具体用法?PHP Entry::setEnabled怎么用?PHP Entry::setEnabled使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Entry
的用法示例。
在下文中一共展示了Entry::setEnabled方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: DataGridCapture
function DataGridCapture($numrows, $numcolumns, $titles, $gadget, $action, $entry_type, $caption = '', $id = '')
{
$this->_name = 'datagridcapture';
$this->_class = 'datagrid';
$this->_columns = array();
$this->_caption = $caption;
$this->_actionColumns = array();
$this->_data = array();
if (empty($id)) {
$this->_id = 'datagridcapture_' . rand(1, 100);
} else {
$this->_id = $id;
}
/*if (is_array($data)) {
$this->_data = $data;
} else {
die("beh!");
}
*/
$this->setOddColor('#eee');
$this->setEvenColor('#fff');
for ($id = 0; $id < $numrows; $id++) {
$idtext = $this->_id . '_' . $id;
$keyField1 = new Entry('name_' . $idtext, str_replace('"', '"', ''));
#$keyField->setStyle('background: transparent;border-style: solid; border: 10px;');
$keyField1->setStyle('border-style: solid; border: 10px;');
$keyField1->setEnabled(true);
$keyField1->setSize(30);
$data[$id]['key'] = $keyField1->get();
$keyField2 = new Entry('value_' . $idtext, str_replace('"', '"', ''));
$keyField2->setStyle('background: transparent; border: 1px;');
$keyField2->setEnabled(true);
$keyField2->setSize(30);
$data[$id]['value'] = $keyField2->get();
$data[$id]['action'] = '<a OnClick="javascript: if(confirm(\'Are this values correct?\')) { window.location=\'?gadget=' . $gadget . '&action=' . $action . '&id=' . $id . '&key=\'+document.getElementById(\'' . $keyField1->getID() . '\').value+\'&value=\'+document.getElementById(\'' . $keyField2->getID() . '\').value+\'&entry_type=' . $entry_type . '\';}"><img id="imgcat' . $id . '" src="images/stock/save.png" border="0" alt="" /></a>';
}
parent::init();
foreach ($titles as $t) {
$this->addColumn(new Column(_("{$t}"), "{$t}", true));
}
$this->addData($data);
}
示例2:
function _buildXHTML()
{
$this->_entry->setReadOnly($this->_readOnly);
$this->_entry->setEnabled($this->_isEnabled);
$this->_button->setEnabled($this->_isEnabled);
$this->_XHTML = "<table";
$this->_XHTML .= $this->buildBasicXHTML();
$this->_XHTML .= $this->buildJSEvents();
$this->_XHTML .= ">\n";
$this->_XHTML .= " <tr>\n";
$this->_XHTML .= " <td>\n";
$this->_XHTML .= $this->_entry->get();
$this->_XHTML .= " </td>\n";
$this->_XHTML .= " <td>\n";
$this->_XHTML .= $this->_button->get();
$this->_XHTML .= " </td>\n";
$this->_XHTML .= " </tr>\n";
$this->_XHTML .= "</table>";
}