Re: First steps with PHP-GTK

From: Date: Wed, 25 Aug 2004 14:31:35 +0000
Subject: Re: First steps with PHP-GTK
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-11718@lists.php.net to get a copy of this message
Sorry!!!! I post to the wrong list... :((( Sorry! Sorry! Sorry! Sorry! Ricardo. "Ricardo Cezar" <hosptalab@wnet.com.br> escreveu na mensagem news:20040825132331.86239.qmail@pb1.pair.com... > 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.smarty.general (#11718) next »