Posted By

rizwan on 01/19/08


Tagged


Versions (?)

Displaying date on a client side window using PHP-GTK


 / Published in: PHP
 

URL: http://rizwan.co.in/blog

  1. <?php
  2.  
  3. $dttime = date('Y-m-d H:i:s');
  4. $label1 = "The date is ". $dttime;
  5.  
  6. function updatedate($button)
  7. {
  8. $button->date('Y-m-d H:i:s');
  9. return $this;
  10. }
  11.  
  12.  
  13. $win = new GtkWindow();
  14. $button = new GtkButton();
  15. $button->$label1;
  16.  
  17. $button->connect('clicked', 'updatedate');
  18.  
  19. $win->add($button);
  20. $win->connect_simple('destroy', array('Gtk', 'main_quit'));
  21. $win->show_all();
  22.  
  23. gtk::main();
  24.  
  25. ?>

Report this snippet  

You need to login to post a comment.