本文整理汇总了PHP中Button::setWidth方法的典型用法代码示例。如果您正苦于以下问题:PHP Button::setWidth方法的具体用法?PHP Button::setWidth怎么用?PHP Button::setWidth使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Button
的用法示例。
在下文中一共展示了Button::setWidth方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getUpdateAllMask
/**
* Im Unterschied zu getUpdateMask() liefert diese Methode eine Tabelle in der Direkt alle Felder Eingabefelder sind,
* somit kann man direkt mehrere Zeilen auf einmal bearbeiten.
*/
function getUpdateAllMask()
{
$tNames = array();
$colNames = array();
$i = 0;
foreach ($this->COLNAMES as $colName) {
if (!$this->isNoUpdateCol($colName)) {
$lbl = "";
if ($i < count($this->LABELS)) {
$lbl = $this->LABELS[$i];
} else {
$lbl = $colName;
}
array_push($tNames, $lbl);
array_push($colNames, $colName);
}
$i++;
}
$deleteMask = null;
if ($this->isDeleteInUpdate()) {
$deleteMask = !$this->doDeleteFromUpdatemask() ? null : $this->doDeleteFromUpdatemask();
// Damit die Spalte mit dem Entfernen Button
// zur Verfügung steht, in Arrays einbinden.
array_push($colNames, "entfernen");
array_push($tNames, "entfernen");
}
$table = new Table($tNames);
if (count($this->COLSIZES) > 0) {
$table->setColSizes($this->COLSIZES);
}
$table->setHeadEnabled(true);
$table->setBackgroundColorChange(true);
if ($this->WIDTH > 0) {
$table->setWidth($this->WIDTH);
}
if ($this->HEIGHT > 0) {
$table->setHeight($this->HEIGHT);
}
if ($this->BORDER != null && strlen($this->BORDER) > 0) {
$table->setBorder($this->BORDER);
}
if ($this->PADDING >= 0) {
$table->setPadding($this->PADDING);
}
if ($this->HEAD_ENABLED) {
$table->setHeadEnabled($this->HEAD_ENABLED);
}
if ($this->SPACING >= 0) {
$table->setSpacing($this->SPACING);
}
if ($this->XPOS > 0 && $this->YPOS > 0) {
$table->setXPos($this->XPOS);
$table->setYPos($this->YPOS);
}
//---------------------------------------------------
// gesamte Tabelle einlesen um Feldtypen zu ermitteln
//---------------------------------------------------
$cns = "";
foreach ($colNames as $cn) {
if (strpos(" " . $this->COLNAMESTRING, $cn) > 0) {
$cns .= $cns == "" ? $cn : "," . $cn;
}
}
$stmnt = "SELECT " . $cns . " FROM " . $this->TABLENAME . " LIMIT 1 ";
$result = $this->DBCONNECT->executeQuery($stmnt);
//---------------------------------------------------
// ROWS in Table aufnehmen
//---------------------------------------------------
$dbComboArrays = array();
$bgCtr = 1;
for ($ir = 1; $ir <= count($this->ROWS); $ir++) {
$r = $table->createRow();
$r->setStyle("padding", "5px 5px");
$rowId = $this->ROWS[$ir]->getAttribute(count($this->COLNAMES));
$r->setBackgroundColor($_SESSION['config']->COLORS['Tabelle_Hintergrund_' . $bgCtr]);
if ($bgCtr == 1) {
$bgCtr = 2;
} else {
$bgCtr = 1;
}
//---------------------------------------------------
// SPALTEN aufbauen
//---------------------------------------------------
for ($ia = 0; $ia < count($this->COLNAMES); $ia++) {
$row = $this->ROWS[$ir];
$t = "";
$fieldName = mysql_field_name($result, $ia);
$fieldLen = 30;
if (!$this->isNoUpdateCol($fieldName)) {
$maxLen = mysql_field_len($result, $ia);
if ($maxLen < $fieldLen) {
$fieldLen = $maxLen;
}
$lookups = getLookupWerte($_SESSION['config']->DBCONNECT, $this->TABLENAME, $fieldName);
if (mysql_num_rows($lookups) > 0) {
$t = new LookupCombo($_SESSION['config']->DBCONNECT, $fieldName . $rowId, $this->TABLENAME, $fieldName, $row->getNamedAttribute($fieldName));
//.........这里部分代码省略.........
示例2: createExamples
public function createExamples($ind)
{
$table_box = new Table();
$table_box->setWidth(250)->setDefaultAlign(RowTable::ALIGN_LEFT);
$table_box->addRow();
$body_obj = new Object();
$body_obj->setAlign(Object::ALIGN_CENTER);
//->setId("id_body_obj")->setStyle("padding:5px;background:".$this->background_body->getValue().";");
$text_obj = new Object(__(TEXT_ON_BODY));
$body_obj->add($text_obj->setId("id_body_text"), "<br/>");
$link_obj = new Object(new Link("javascript:void(0);", Link::TARGET_BLANK, __(LINK_ON_BODY)));
$body_obj->add($link_obj->setId("id_body_link"), "<br/>");
$body_obj->add($this->text_link_note_obj, "<br/>");
$table_box->addRow($body_obj);
$table_box->addRow();
$table_box->addRow();
$button_1 = new Button($this);
$button_1->setWidth(245);
$table_box->addRow($button_1->setValue("Button [style jquery]"));
$table_box->addRow();
$tabs = new Tabs("tab-sample");
$tabs->addTab("Tab1", "");
$tabs->addTab("Tab2", "");
$tabs->addTab("Tab3", "");
$table_box->addRow($tabs);
$table_box->addRow();
$table_box->addRow();
$table_box->addRow();
$table_box->addRow();
$table_box->addRow();
$dialogbox = new DialogBox(__(DIALOGBOX_TITLE), __(DIALOGBOX_CONTENT));
$dialogbox->setWidth(245)->activateOneInstance()->setPosition("");
$dialogbox_link = new Object(new Link($dialogbox, Link::TARGET_NONE, __(VIEW_DIALOGBOX)));
$table_box->addRow($dialogbox_link->setId("id_dialogbox_link"));
$dialogbox->setPositionX("\$('#" . $dialogbox_link->getId() . "').position().left-f_scrollLeft()");
$dialogbox->setPositionY("\$('#" . $dialogbox_link->getId() . "').position().top-f_scrollTop()-70");
$this->addObject(clone $dialogbox);
$table_box->addRow();
$table_box->addRow();
$table_box->addRow();
$table_box->addRow();
$table_box->addRow();
$table_box->addRow();
$style1_box_text = new Box("text", false, $this->current_style_val, $this->current_style_val, "", "box_text_" . $this->current_style_val, 245);
if ($this->background_picture_1->getValue() != "") {
$style1_box_text->forceBoxWithPicture(true, $this->border_table_1->getValue());
} else {
$style1_box_text->forceBoxWithPicture(false);
}
$table_box->addRow($style1_box_text->setContent("Box Object [<a href=\"javascript:void(0);\">style " . $this->current_style_val . "</a>]"));
$style1_box = new Box("link", false, $this->current_style_val, $this->current_style_val, "javascript:void(0);", "box_" . $this->current_style_val, 245);
if ($this->background_picture_1->getValue() != "") {
$style1_box->forceBoxWithPicture(true, $this->border_table_1->getValue());
} else {
$style1_box->forceBoxWithPicture(false);
}
$style1_box->setShadow(true);
$table_box->addRow($style1_box->setContent("Box Object [<a href=\"javascript:void(0);\">style " . $this->current_style_val . "</a>]"));
$style1_box = new RoundBox($this->current_style_val, "round_box_" . $this->current_style_val, 245);
$style1_box->setShadow(true);
if ($this->background_picture_1->getValue() != "") {
$style1_box->forceBoxWithPicture(true, $this->border_table_1->getValue());
} else {
$style1_box->forceBoxWithPicture(false);
}
$table_box->addRow($style1_box->setContent("RoundBox Object<br/>[style " . $this->current_style_val . "]"));
$table_box->addRow();
if (!defined('DEFINE_STYLE_BORDER_TABLE_' . $this->current_style_val)) {
define('DEFINE_STYLE_BORDER_TABLE_' . $this->current_style_val, $this->border_table_1->getValue());
}
$table = new Table();
$table->setId("table_sample")->setWidth(245);
$table->addRowColumns("header1", "header2", "header3")->setHeaderClass($this->current_style_val);
$table->addRowColumns("cel 1-1", "cel 1-2", "cel 1-3")->setId("table_tr_sample")->setBorderPredefinedStyle($this->current_style_val)->setAlign(RowTable::ALIGN_CENTER);
$table_box->addRow($table);
return $table_box;
}