Frist steps on PHP-GTK

From: Date: Wed, 25 Aug 2004 14:32:01 +0000
Subject: Frist steps on PHP-GTK
Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-4998@lists.php.net to get a copy of this message
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 módulo PHP-GTK correto dl('php_gtk.' . (strstr(PHP_OS, 'WIN') ? 'dll' : 'so')) || die("Não foi possível carregar o módulo\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 ?>

« previous php.gtk.general (#4998) next »