Re: Frist steps on PHP-GTK
| From: | Benjamin Smith | Date: | Thu, 26 Aug 2004 21:22:03 +0000 |
| Subject: | Re: Frist steps on PHP-GTK | ||
| References: | 1 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-5008@lists.php.net to get a copy of this message | ||
A nice "Getting started" article has just been posted at phpbuilder:
http://phpbuilder.com/columns/hunter20040826.php3
-Ben
On Wednesday 25 August 2004 07:32, Ricardo Cezar wrote:
> I am in my first steps with PHP-GTK, and I have a lot of questions to make.
>
> Now I'm trying to put a GtkCalendar() and a GtkButton() in a window. When I
> press the button, the GtkCalendar() select today's date.
>
> I can put the calendar to work. I also can put the button in the window, but
> one at a time. When I try to put both, only the calendar is visible.
>
> Someone can help me? I'll put the code here.
>
> I'm sorry for the bad english...
>
> Ricardo
>
>
> ---------------------- THE CODE ----------------------------------
>
>
> <?php
>
> // Carrega o mdulo PHP-GTK correto
> dl('php_gtk.' . (strstr(PHP_OS, 'WIN') ? 'dll' :
> 'so')) || die("N� foi
> poss�el carregar o mdulo\n");
>
> // Fun�es
>
> function hoje() {
> global $calendario;
> $calendario->select_day(date('d'));
> }
>
> $janela = &new GtkWindow();
>
> $calendario = &new GtkCalendar();
> $calendario->select_day(date('d'));
> $janela->add($calendario);
>
> $botao1 = &new GtkButton('Hoje');
> $botao1->connect('clicked', 'hoje');
> $janela->add($botao1);
>
> $janela->show_all(); // mostra a janela
>
> gtk::main(); // loop principal
>
> ?>
>
> --
> PHP-GTK General Mailing List (http://gtk.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
"I kept looking around for somebody to solve the problem.
Then I realized I am somebody"
-Anonymous