Computer Science Canada make a calendar? |
Author: | appling [ Wed Feb 11, 2004 4:47 pm ] | ||
Post subject: | make a calendar? | ||
how could i make a well-formatted calendar? i only draw the box just like this
but how to put the date in the box? ![]() ![]() |
Author: | Paul [ Wed Feb 11, 2004 4:51 pm ] |
Post subject: | |
Draw.Text seems the simplest way to me. I'd just store dates in arrays, and run a for loop, and every time adding on the coordinates. |
Author: | appling [ Wed Feb 11, 2004 4:55 pm ] |
Post subject: | |
can u give me a simple example>? how to make it turn to nest row or column? |
Author: | Cervantes [ Wed Feb 11, 2004 4:59 pm ] | ||
Post subject: | |||
that's the syntax of Draw.Text... you can get that from the help file... ![]() you should use for statements a lot for this project. |
Author: | Paul [ Wed Feb 11, 2004 5:01 pm ] | ||
Post subject: | |||
something like this:
you could do without the array here, but I only put it here so you can see, if you want to mess with it. You can mess with the coordinate increase rate to change the distances from each other. |
Author: | appling [ Wed Feb 11, 2004 5:08 pm ] |
Post subject: | |
thanks a lot, i got it |
Author: | appling [ Wed Feb 11, 2004 8:37 pm ] |
Post subject: | |
sorry, there's one thing i still do not understand. how could i make it if the first day of the month is not beginning with monday, just like thursday or others? ![]() |
Author: | Delos [ Wed Feb 11, 2004 9:10 pm ] |
Post subject: | |
Well, you know the x and y part of the Font.Draw. Just play around with that. My suggestion: Consider the entire screen (or whatever part of it you are using) to be a grid...then use the x and y values to "locate" the point at which you need to put the number. Play around a bit...you'll see. |
Author: | appling [ Wed Feb 11, 2004 9:41 pm ] | ||
Post subject: | |||
i am not sure how to do that. this is my code
|
Author: | Paul [ Wed Feb 11, 2004 9:51 pm ] |
Post subject: | |
k thats good, but when I enter monday, it starts with sunday. Edit: oh I see..., I think you can change the starting init value of the variable that determines the position of the text according to the days. |