Home > Archive > PerlTk > March 2007 > matrix widget to implement a booking calendar
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 |
matrix widget to implement a booking calendar
|
|
| filippo 2007-03-16, 4:25 am |
| hello,
I want a widget to implement a booking calendar for my campsite
manager. I want a table matrix like this:
Y-axis: the number of places for tents. Each number is a place I can
reserve for my guest.
X-axis: days just like a calendar. Better if I can merge cells to have
a nice looking: i.e. first row is the month name merging 31( or 30 or
28) columns (days), second row shows the day numbers (1 to 31 or 30 or
28); subsequent rows/columns are the actual booking calendar: each
cell is a day/place.
I want to be able to select with the mouse one or more cells per row
in order to book a places. I want also to show the cells with
different colors: i.e. green the free places, yellow the booked
places.
Hlist/MList arenot for me: I can't select just few cells in a row
Is there a widget ready for my needs?
If not, can someone give me a hint how to create this?
Thanks,
Filippo
| |
| Ch Lamprecht 2007-03-16, 4:25 am |
| filippo schrieb:
> hello,
>
> I want a widget to implement a booking calendar for my campsite
> manager. I want a table matrix like this:
>
> Y-axis: the number of places for tents. Each number is a place I can
> reserve for my guest.
> X-axis: days just like a calendar. Better if I can merge cells to have
> a nice looking: i.e. first row is the month name merging 31( or 30 or
> 28) columns (days), second row shows the day numbers (1 to 31 or 30 or
> 28); subsequent rows/columns are the actual booking calendar: each
> cell is a day/place.
>
> I want to be able to select with the mouse one or more cells per row
> in order to book a places. I want also to show the cells with
> different colors: i.e. green the free places, yellow the booked
> places.
>
> Hlist/MList arenot for me: I can't select just few cells in a row
>
> Is there a widget ready for my needs?
Hi,
take a look at Tk::TableMatrix
Christoph
--
use Tk;use Tk::GraphItems;$c=tkinit->Canvas->pack;push@i,Tk::GraphItems->
TextBox(text=>$_,canvas=>$c,x=>$x+=70,y=>100)for(Just=>another=>Perl=>Hacker);
Tk::GraphItems->Connector(source=>$i[$_],target=>$i[$_+1])for(0..2);
$c->repeat(30,sub{$_->move(0,4*cos($d+=3.16))for(@i)});MainLoop
| |
| filippo 2007-03-17, 4:04 am |
| On 16 Mar, 09:08, Ch Lamprecht <ch.l.n...@online.de> wrote:
> take a look at Tk::TableMatrix
thanks,
it is perfect to me.
BR,
Filippo
| |
|
|
|
|
|