Re: Usage of GtkCalendar with PHP-GTK2

From: Date: Thu, 15 Jun 2006 14:38:09 +0000
Subject: Re: Usage of GtkCalendar with PHP-GTK2
References: 1  Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-7010@lists.php.net to get a copy of this message
Hello, I had the same trouble... get_date() is implemented but in cvs, you can get it at : http://gnope.org/pearfront/index.php?package=Gnope_PHPGtk2_dll I changed from php-gtk1 by making a gkdialog modal and get the response :
    $dialog = new GtkDialog( null, null, Gtk::DIALOG_MODAL,
                 array(Gtk::STOCK_OK, Gtk::RESPONSE_OK,
                   Gtk::STOCK_CANCEL, Gtk::RESPONSE_CANCEL));
    $dialog->vbox->add($calendar=new GtkCalendar ());
      $calendar->select_day($day);
      $calendar->select_month($month, $year);
    $dialog->show_all();
    if(Gtk::RESPONSE_OK == $dialog->run()){
      $array=$calendar->get_date();
    }
    $dialog->destroy();
Regards,
Benjamin Fourticq. Christian Michel a écrit :
Hello, in an application, build with php-gtk1 I had a GtkCalendar in it. I was able to select month, day, year from it, request properties Widget->selected_day, Widget->year and Widget->month from it. Under PHP-Gtk2 these properties aren't available and get_date() isn't implemented yet. So without any possibility to get a date back, this Widget may be useless at the moment. Or is there a workaround, to get the date values from the widget, when "day-selected-double-click"- signal is emitted? Thanks for answers. Christian Michel


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