For Programmers: Free Programming Magazines  


Home > Archive > PHP Smarty Templates > August 2004 > Re: [SMARTY] First steps with PHP-GTK









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [SMARTY] First steps with PHP-GTK
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
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com