Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 8 of 8 total
Thread Calendar Query
Thu, Jun 15 2017 5:22 PMPermanent Link

Mark Brooks

Slikware

Avatar

Can anybody clarify the following for a Calendar:

- How to set earliest / latest date (if possible)
- How to navigate with mouse / touch (and no keyboard)

The latter is bugging me in particular since I can't seem to go back beyond 1st  Jan 2000 using mouse or touch.

Thanks in advance

Mark
Fri, Jun 16 2017 2:03 AMPermanent Link

Uli Becker

Hi Mark,

> - How to set earliest / latest date (if possible)

The only way I know is to use the OnChange event:

   if TCalendar(Sender).Text > DateToStr(date) then
      TCalendar(Sender).Text := DateToStr(date);

> - How to navigate with mouse / touch (and no keyboard)
> The latter is bugging me in particular since I can't seem to go back beyond 1st  Jan 2000 using mouse or touch.

Not sure what you mean - that works without problems here clicking on
the arrow buttons. (Screenshot attached).

Uli




Attachments: Clip11.png
Fri, Jun 16 2017 2:31 AMPermanent Link

Mark Brooks

Slikware

Avatar

Hi Uli

Thanks for this. I get the OnChange bit and will implement.

Regarding the mouse navigation, I can only get as far as Jan 1st 2000 when I click the back button. The view changes from month to year to something else then won't go any further. Screen shot attached.

Cheers
Mark



Attachments: TCalendar.png
Fri, Jun 16 2017 3:02 AMPermanent Link

Uli Becker

Mark,

> Regarding the mouse navigation, I can only get as far as Jan 1st 2000 when I click the back button. The view changes from month to year to something else then won't go any further. Screen shot attached.

TCalendarView = (cvMonth,cvYear,cvDecade,cvCentury);

Yes, it seems to change to cvDecade and cvCentury. No idea why though. I
can't replicate that here.
Are you using a customized control? Are you seeing the same issue in a
fresh project with everything set to default?

Uli
Fri, Jun 16 2017 7:56 AMPermanent Link

Mark Brooks

Slikware

Avatar

Uli

When a drop a TCalendar on a form, at design time, and run the app, I get what I think is the desired behaviour. Specifically I can use the arrows to move back and forward in the current view and click the "middle section" to change the view that I'm navigating in (month, year etc). This is great because it makes it simple to enter dates of birth, for example, which may be some time ago - you can get to them really quickly.

However, when I create a TCalendar inside a custom component then the behaviour is different. Clicking on the "middle section " OR the arrows changes the view and doesn't let me go back beyond 1/1/2000. What am I doing!

Mark
Fri, Jun 16 2017 9:21 AMPermanent Link

Uli Becker

Mark,

<<
However, when I create a TCalendar inside a custom component then the behaviour is different. Clicking on the "middle section " OR the arrows changes the view and doesn't let me go back beyond 1/1/2000. What am I doing!
>>

That's weird. I think Tim needs to help. Please post here what caused the issue when you know the solution.

Uli
Fri, Jun 16 2017 1:03 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Mark,

<< However, when I create a TCalendar inside a custom component then the behaviour is different. Clicking on the "middle section " OR the arrows changes the view and doesn't let me go back beyond 1/1/2000. What am I doing! >>

Please send me an example project that demonstrates what you're seeing, and I'll take a look.  I suspect that the event dispatching isn't working correctly in your custom component.

Tim Young
Elevate Software
www.elevatesoft.com
Wed, Jul 5 2017 10:29 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Mark,

Just a follow-up on this for everyone reading:

The issue is a bug in the TCalendarSelectButton interface.  The select button (at the top, in the middle) is set up to just center itself in the middle of the month-year container, but thatís a problem if the month-year container is equal-to-or-smaller-than the select button because it causes the select button to overlap the back/forward buttons, thus exhibiting the issue that you saw.

Iíll have a fix for this in 2.06 B3, which is going out today.

Tim Young
Elevate Software
www.elevatesoft.com
Image