Fw: [PHP-GTK] Sizing HBox or Entry
| From: | Steph | Date: | Thu, 27 Dec 2001 16:02:57 +0000 |
| Subject: | Fw: [PHP-GTK] Sizing HBox or Entry | ||
| Groups: | php.gtk.general | ||
| Request: | Send a blank email to php-gtk-general+get-927@lists.php.net to get a copy of this message | ||
If it's a GtkHBox, try set_usize(width, height) on the entries.
You can use gdk::screen_width() and gdk::screen_height() to make these relative to the res. or pixel
values to make them absolute.
eg (back to my sample):
$entries = array();
for ($i = 0; $i < 10; $i++) {
$entries[$i] = &new GtkEntry();
$box->pack_start($entries[$i], false, false, 0);
$entries[$i]->set_usize(((gdk::screen_width()-20)/10), 30);
$entries[$i]->show();
}
fills the screen width less 20 pixels whatever your resolution and makes all entries equal.
----- Original Message -----
From: "Steph" <Steph.Fox@btinternet.com>
To: "Anson Rinesmith" <anson@lddcorp.com>; "PHP GTK GENERAL"
<php-gtk-general@lists.php.net>
Sent: Thursday, December 27, 2001 3:50 PM
Subject: Re: [PHP-GTK] Sizing HBox or Entry
I've looked at this twice now and still don't understand the problem. I've tried a
test script and get the usual 150 pixel-wide GtkEntry; the whole thing doesn't come in at more
than 350 pixels in height I'd guess. This on win98.
Which system are you running?
(test script below)
<?
dl('php_gtk.' . (strstr(PHP_OS, 'WIN') ? 'dll' : 'so')) ||
die("Can't load php_gtk module!\n");
$window = &new GtkWindow();
$window->set_position(GTK_WIN_POS_CENTER);
$window->connect_object('destroy', array('gtk', 'main_quit'));
$frame = &new GtkFrame();
$window->add($frame);
$box = &new GtkVBox();
$frame->add($box);
$entries = array();
for ($i = 0; $i < 10; $i++) {
$entries[$i] = &new GtkEntry();
$box->pack_start($entries[$i], false, false, 0);
$entries[$i]->show();
}
$window->show_all();
gtk::main();
?>
----- Original Message -----
From: "Anson Rinesmith" <anson@lddcorp.com>
To: "PHP GTK GENERAL" <php-gtk-general@lists.php.net>
Sent: Wednesday, December 26, 2001 6:07 PM
Subject: [PHP-GTK] Sizing HBox or Entry
I have a Frame, that holds a Box of Entry 's
I have them pack_start($entry,false,false,0)
I have 10 Entry 's
It is causing my window to become so large I can't see the borders.
Is there a way to size the box or the entries?
I have the window size set, but it makes it larger when
adding entries.
Or is there a different combo other than
Box/Entry that would fit in a Frame and be sizeable?
Thanks Again
--
PHP-GTK General Mailing List (http://gtk.php.net/)
To unsubscribe, e-mail: php-gtk-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-gtk-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net