| Andreas Otterstein 2004-08-25, 3:59 pm |
| Hi,
whats wrong with you? This is the smarty mailing list. Smarty is a
template system for php.
write in the gtk mailing list.
take a look at gtk.php.net.
bye
Andreas
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 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
>
>?>
>
>
>
--
Data-Center
system solutions
Harras 55
2564 Furth
T 02674 88488
office@data-center.at
http://www.data-center.at
|