gnope php gtk gui gnope.org  

select a week from GtkCalendar

 
Post new topic   Reply to topic    gnope.org Forum Index -> PHP GTK2 Beginners
View previous topic :: View next topic  
Author Message
mkhattar



Joined: 23 Aug 2007
Posts: 2

PostPosted: Thu Aug 23, 2007 10:51 am    Post subject: select a week from GtkCalendar Reply with quote

Hello all Wink

i am new to this forum and i have a question regarding php-gtk, i want to select a week from gtkcalendar is this possible?

thanks a lot,
Manar
Back to top
kksou



Joined: 06 Sep 2006
Posts: 25

PostPosted: Mon Aug 27, 2007 9:15 am    Post subject: Reply with quote

You didn't give too much details as to how you want the user to select the week.

Assuming that the user will select a week by clicking on any date within the week, here's a sample code:

http://www.kksou.com/php-gtk2/articles/let-user-select-week-with-a-popup-calendar.php

sample output:


Regards,
/kksou
Back to top
mkhattar



Joined: 23 Aug 2007
Posts: 2

PostPosted: Mon Aug 27, 2007 10:27 am    Post subject: Reply with quote

hello again Smile

Thank you for the information, it is really helpful, but i want the user to be able to select the week number (shown by enabling the Gtk::CALENDAR_SHOW_WEEK_NUMBERS flag), so the user moves the mouse over the week numbers and selects one of them and retrieves the corresponding week number to be used in a certain function. Is this possible or the only choice is to select a day of the week?

P.S: i am a female Smile

Regards,
Manar
Back to top
kksou



Joined: 06 Sep 2006
Posts: 25

PostPosted: Tue Aug 28, 2007 8:06 am    Post subject: Reply with quote

Hi Manar,

Have changed the code slightly to show the week number.

While the week number can be displayed in GtkCalendar, there are no signals to respond to mouse clicks on that week number.

If you are really really need that feature, you can come out with your own customized calendar using GtkDialog + GtkTable + 'button-press-event'

Regards,
/kksou

p.s. oops, sorry about that. have fixed it...
Back to top
Display posts from previous:   
Post new topic   Reply to topic    gnope.org Forum Index -> PHP GTK2 Beginners All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Templates enhanced by DigiWiki. Hosting by Tradebit.