View Full Version : what about gtk ??
is there any such help forum for phpGTK ??
firepages
09-22-2002, 09:49 AM
there is the gtk mailing list you can join at http://gtk.php.net/
but please feel free to ask your questions in this forum
emm...there is one I posted at your forum....at firepages.com.au :D
http://www.firepages.com.au/forum/index.php?act=ST&f=4&t=300
actually its only installation blues....I wish i could download some installation packages given at your site, but the size is tooooo large for my dial-up connection to afford...
firepages
09-22-2002, 11:34 AM
doh forgot about that forum :thumbsup:
I replied there as well and said ...
Hi, if you have win2000 or XP - grab dev5beta as it should setup GTK for you , else have a look at this ...
http://www.webmasterbase.com/article/839
Well....i chanced upon this cool link and that sort of solved my problem. methinks it deserves all publicity possible :D
http://www.jasonmatteson.com/php_gtk_install.php
yea...I wish I could download that phpdev5...but like I said...its one file too huge for me to be able to download it. But thanks to u, I looked up in the mailing lists to get my solution.
....just thought I'd mention here another page that helped me sort out my php4.2 installation long back...
http://in.geocities.com/samdarshipali/apache-php-mysql.htm
uhh ohh one more question..though its not related to istallation...using phpgtk, can I make apps that can later be used on other machines which DONT have php installed ?
firepages
09-22-2002, 01:39 PM
uhh ohh one more question..though its not related to istallation...using phpgtk, can I make apps that can later be used on other machines which DONT have php installed ?
not at the moment..... at least you have to include the php4ts.dll and some of the gtk libraries (i.e. distribute the full contents of the win32 binary download) , I am trying to come up with a wrapper for this but my C++ is a little rusty :)
thats like... sad...maybe it'll take some time before this is possible....but in the meantime it looks like I got a lot to learn :p
thanks for the help...
byee.
now comes the obvious part....any nice DOWNLOADABLE tutorials online ? or is there any neat book ? I got this sam's teach yourself GTK+ on my desk...but its confusing me more than teaching me anything.:(
yea.....I looked all over the place and dint find a single tutorial not any help forum worth its name. Ok....I'm starting to put some pieces together...looks like I must start writing a tutorial now :D lol...
ok...I'm running into some problem with a very simple code I made. Can somebody pls. help me out resolving this problem ????
This is one application I managed to make (giving code below); but I got a big doubt with the $window->set_policy part.
What shud I do, so that my window is resizable, but not to the extent that the the label gets clipped. And eve the size of the button remains constant inspite of resizing the window.
<?
if (!class_exists('gtk')) {
if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN')
dl('php_gtk.dll');
else
dl('php_gtk.so');
}
function close(){
Gtk::main_quit();
}
$window = &new GtkWindow();
$window->set_policy(FALSE, true, FALSE);
$vbox = &new GtkVBox(FALSE,10);
$window->add($vbox);
$label = &new GtkLabel('Every Dog has his day ');
$vbox->pack_start($label);
$separator=&new GtkHSeparator();
$vbox->pack_start($separator);
$button=&new GtkButton();
$label2=&new GtkLabel('quit');
$button->add($label2);
$button->connect('clicked', 'close');
$vbox->pack_start($button);
$tooltip=&new GtkTooltips();
$tooltip->set_delay(100);
$tooltip->set_tip($button, 'Close current window!', '');
$tooltip->enable();
$window->show_all();
Gtk::main();
?>
thanks in advance :D
firepages
10-02-2002, 12:26 PM
Hi, well truth is that in your example you cant actually do what you want to do, i.e. allow resizing yet keep your vbox at a set width... not using just the one GtkVbox at least (I am sure you are supposed to be able to but thats another story...)
anyway - in the example below I pack the vbox inside a GtkHbox along with another GtkVbox..
then the sizing policy of the outer Hbox obeys what it is supposed to be doing.
I know its a work around but most apps will be more complex than just 1 window
note the use of set_usize() to give your vbox a set width to which it has to stick to.
I dont pretend to understand exactly how all the sizing stuff is supposed to work, nor do some of the developers, its a bit of a minefield but I think a lot of these issues will be cleared up with GTK2 we will have to wait and see.
Take a look at GtkTable for a still strange but useful alternative to laying stuff out
<?
dl('php_gtk.' . (strstr(PHP_OS, 'WIN') ? 'dll' : 'so'));
function close(){
Gtk::main_quit();
}
$window = &new GtkWindow();
$window->set_usize(200,100);
$window->set_policy(FALSE, TRUE, FALSE);
$label = &new GtkLabel('Every Dog has his day ');
$separator=&new GtkHSeparator();
$button=&new GtkButton('quit');
$button->connect('clicked', 'close');
$tooltip=&new GtkTooltips();
$tooltip->set_delay(100);
$tooltip->set_tip($button, 'Close current window!', '');
$tooltip->enable();
$vbox_right=& new GtkVbox(FALSE,0);
$vbox_left = &new GtkVBox(FALSE,10);
$vbox_left->set_homogeneous(FALSE);
$vbox_left->set_usize(200,100);
$vbox_left->pack_start($label,FALSE,FALSE,0);
$vbox_left->pack_start($separator,FALSE,FALSE,0);
$vbox_left->pack_start($button,FALSE,FALSE,0);
$hbox=& new GtkHbox(FALSE,1);
$hbox->pack_start($vbox_left,FALSE,FALSE,0);
$hbox->pack_start($vbox_right,FALSE,FALSE,0);
$window->add($hbox);
$window->show_all();
Gtk::main();
?>
okie.....this like makes all buttons n all of fixed size...so its something about
$vbox_left->pack_start($button,FALSE,FALSE,0);
I can sort of work with it....and yea....tables is anyday a nicer way to pack stuff...I ws supposed read up abt the a lill later lol.
but thanks soooooooo much for helpin me out.:thumbsup:
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.