Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: TCalendarView Documentation


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 1 - Last Post: Nov 26, 2017 1:24 PM Last Post By: Paul Jackson Threads: [ Previous | Next ]
Adam Martin

Posts: 3
Registered: 3/21/12
TCalendarView Documentation  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 2, 2017 3:40 PM
Does anyone know if there is any more documentation for TCalendarView then the very basic information on docwiki and a couple random blogs announcing it?

For example, one of the blogs mentions you can change the FocusedColor of the dotted line rectangle, but I can't find anything about where the dotted rectangle comes from in the first place. It looks like it is the date you last clicked, but how can I access that to either use it or clear it depending on what I'm trying to do?

I didn't see anything to have the calendar select a date range when you click two dates, so I wrote some code in the OnClick that will check if you already have a date selected, fill in the SelectedDates with the days in between in order. When you click on one of those days in the range, I'd like to clear the dates that were selected and only select the one the user clicked on, but I can't figure out a way to tell which date they clicked on. Seems like it would be the "Focused" date, but other than the color I can't access it. Instead I'm currently just clearing all the dates and they have to start over picking the two dates. But now when you scroll in the calendar the mysterious Focused rectangle is showing up, but I don't see why the user would want to see that, or how to hide it entirely.
Paul Jackson

Posts: 61
Registered: 3/2/17
Re: TCalendarView Documentation  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 26, 2017 1:24 PM   in response to: Adam Martin in response to: Adam Martin
Hi Adam,

did you ever find any information about using the TCalendarView control. I'm have a similar situation as you and need to control what's put in the cells of a day item. I'm not having much luck finding any examples. The only only I did find is M$ CalendarView which has a DayItem one can reference and add a list of colors, density bars they call them, as small rectangles within the cell, but it because TCalendarView is not a wrapper like many VCL controls, it does't seem that the control has anything like the density bars. I starting to think I my have to override the OnDayItemDraw and somehow grab the context and draw stuff myself?

Any advice would be greatly appreciated.

Best,
-Paul

Adam Martin wrote:
Does anyone know if there is any more documentation for TCalendarView then the very basic information on docwiki and a couple random blogs announcing it?

For example, one of the blogs mentions you can change the FocusedColor of the dotted line rectangle, but I can't find anything about where the dotted rectangle comes from in the first place. It looks like it is the date you last clicked, but how can I access that to either use it or clear it depending on what I'm trying to do?

I didn't see anything to have the calendar select a date range when you click two dates, so I wrote some code in the OnClick that will check if you already have a date selected, fill in the SelectedDates with the days in between in order. When you click on one of those days in the range, I'd like to clear the dates that were selected and only select the one the user clicked on, but I can't figure out a way to tell which date they clicked on. Seems like it would be the "Focused" date, but other than the color I can't access it. Instead I'm currently just clearing all the dates and they have to start over picking the two dates. But now when you scroll in the calendar the mysterious Focused rectangle is showing up, but I don't see why the user would want to see that, or how to hide it entirely.

--
-Paul
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02