本文整理汇总了PHP中GtkHBox::set_size_request方法的典型用法代码示例。如果您正苦于以下问题:PHP GtkHBox::set_size_request方法的具体用法?PHP GtkHBox::set_size_request怎么用?PHP GtkHBox::set_size_request使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GtkHBox
的用法示例。
在下文中一共展示了GtkHBox::set_size_request方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: show
/**
* Show the table and all aggregated rows
*/
public function show()
{
if ($this->showed === FALSE) {
$i = 0;
if ($this->rows) {
foreach ($this->rows as $row) {
$c = 0;
if ($row->getCells()) {
foreach ($row->getCells() as $column) {
$properties = $column->getProperties();
$properties['colspan'] = isset($properties['colspan']) ? $properties['colspan'] - 1 : 0;
$hbox = new GtkHBox();
if (isset($properties['width'])) {
$hbox->set_size_request($properties['width'], -1);
}
$hbox->set_border_width(1);
$hbox->pack_start($column->getContent(), false, false);
$column->getContent()->show();
//$hbox->pack_start(new GtkHBox, true, true);
parent::attach($hbox, $c, $c + 1 + $properties['colspan'], $i, $i + 1, GTK::FILL, 0, 0, 0);
$c++;
}
}
$i++;
}
}
$this->showed = TRUE;
}
parent::show();
}
示例2: link
$window = new GtkWindow();
$window->set_size_request(400, 200);
$window->set_title('launch browser');
$window->connect_simple('destroy', array('Gtk', 'main_quit'));
$window->add($vbox = new GtkVBox());
// displays a title
$title = new GtkLabel("Launch External Application in windows\n without the flashing of cmd window");
$title->modify_font(new PangoFontDescription("Times New Roman Italic 10"));
$title->modify_fg(Gtk::STATE_NORMAL, GdkColor::parse("#0000ff"));
$title->set_size_request(-1, 40);
$vbox->pack_start($title, 0, 0);
$vbox->pack_start(new GtkLabel(''));
// create the clickable label
$clickable_label = new GtkHBox();
$clickable_label->set_size_request(-1, 24);
$vbox->pack_start($clickable_label, 0, 0);
$clickable_label->pack_start(new GtkLabel("reference: php-gtk2 "), 0, 0);
$clickable_label->pack_start(link("manual", "http://gtk.php.net/manual/en/gtkclasses.php"), 0, 0);
$clickable_label->pack_start(new GtkLabel(" and "), 0, 0);
$clickable_label->pack_start(link("mailing list", "http://www.nabble.com/Php---GTK---General-f171.html"), 0, 0);
//$vbox->pack_start(new GtkLabel(''));
$status = new GtkLabel('');
$status->set_alignment(0, 0);
$vbox->pack_start($status, 0, 0);
// function to setup the link
function link($title, $url)
{
$label = new GtkLabel($title);
$label->set_markup('<span color="blue"><u>' . $title . "</u></span>");
$eventbox = new GtkEventBox();