Re: Usage of GtkCalendar with PHP-GTK2
| From: | André Jansen | Date: | Thu, 15 Jun 2006 19:36:08 +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-7011@lists.php.net to get a copy of this message | ||
On 15 Jun 2006 at 14:58, Christian Michel wrote:
> 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.
A few lines from a callback I wrote a few months ago (and works):
$m = $cal->get_property('month') + 1; // months are numbered from 0 to 11
$y = $cal->get_property('year');
$d = $cal->get_property('day'); // 0 if no day selected
BTW, I am using the latest version of php-gtk2 from the Gnope site, the
Inspector tells me that GtkCalendar->get_date() does exists - but I
haven't used it, I can't remember for what reason :).
Hope this helps.
Regards,
--
André
*** The Flying Dutchman's blog : http://fdpad.blogspot.com
===========================================================
Black Holes were created when God divided by zero.