Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Calendar
  New Posts New Posts RSS Feed - Trouble selecting AllDayEvent
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Trouble selecting AllDayEvent

 Post Reply Post Reply
Author
Message
Marco1 View Drop Down
Senior Member
Senior Member


Joined: 16 January 2004
Location: Germany
Status: Offline
Points: 251
Post Options Post Options   Thanks (0) Thanks(0)   Quote Marco1 Quote  Post ReplyReply Direct Link To This Post Topic: Trouble selecting AllDayEvent
    Posted: 12 October 2009 at 6:26am
Run Samples/CalendarDemo with sample data.
Switch to work week view.

It's only possible to select an multiday AllDayEvent if you click on the start day of the event. Clicking on the following days of an event is ignored and the event can't be selected.
Tested with 13.2 beta of 09-09-21

Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 13 October 2009 at 12:34pm
I tried your case with same demo - https://forum.codejock.com/uploads/DemoVersion/CalendarDemoStatic.rar
In WorkWeek view I had 3-days event - covered 3 columns. I can click in middle part and event editor show this 3-days selected event properties.
 
Back to Top
Marco1 View Drop Down
Senior Member
Senior Member


Joined: 16 January 2004
Location: Germany
Status: Offline
Points: 251
Post Options Post Options   Thanks (0) Thanks(0)   Quote Marco1 Quote  Post ReplyReply Direct Link To This Post Posted: 14 October 2009 at 5:49am
Okay, have to make it more clear.
See my pic below. Create a 3 day multidayevent and try to select it on "Donnerstag" (Thursday). Not possible (for me). Also tested with your demo sample code above.


Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 14 October 2009 at 9:06am

I agree - it can happened because sometimes your long event will be draw as one-day-width event with arrow directed to right (as sign of continue).

It depends on sort order of allday events, height of allday area and mode.
So better use initial part of visual event to make selection in multi-column view mode. This is not serious restriction.
 
Try this mode:
CXTPCalendarDayView* pDayView = DYNAMIC_DOWNCAST(CXTPCalendarDayView, GetCalendarCtrl().GetDayView());

if (pDayView) pDayView->m_bEcoAllDayMode = TRUE;

and you will understand logic of the case better.
(You need to use now scrollbar to see some of allday events but you will have more space for usual events - many clients asked it)
 
See my snaoshot with fragments from different mode run:
Back to Top
Marco1 View Drop Down
Senior Member
Senior Member


Joined: 16 January 2004
Location: Germany
Status: Offline
Points: 251
Post Options Post Options   Thanks (0) Thanks(0)   Quote Marco1 Quote  Post ReplyReply Direct Link To This Post Posted: 14 October 2009 at 9:32am
Sorry Mark, I don't understand your answer... and I can't see any arrows.
For my customer it's absolutely a bug. Not being able to click and edit a truely visible alldayevent is not the expected behavior.

Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 14 October 2009 at 10:12am

Hi, Marco1, I attached snapshot to my prev post where you can see effect of different modes.

>>absolute a bug:

- consider that this "spreadsheet-like" mode (multi-column) similar to Excel where cell text (in long text case) can also use neighbour cells if they are empty but user still need to select initial cell to start edit.
 
If you don't like this behaviour - you can overwrite it in your derived class - as you are using MFC source
 
Back to Top
Marco1 View Drop Down
Senior Member
Senior Member


Joined: 16 January 2004
Location: Germany
Status: Offline
Points: 251
Post Options Post Options   Thanks (0) Thanks(0)   Quote Marco1 Quote  Post ReplyReply Direct Link To This Post Posted: 14 October 2009 at 10:41am
Okay, but Eco mode is not an option in this case.
I tried my sample above in Outlook 2007 and of course it works like expected.

Even if I consider the calendar spreadsheet-like, if the mouse pointer is above an event and I want to click/select it - and instead the event below (or the background) gets selected, I see it as my customer - as a bug. Not a big one, but it's there.

I do not have time in the moment to trace and debug calendar module any futher, so I reported it.
Working around and selecting different display mode is not wanted.

Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 14 October 2009 at 11:00am
I understand it, Marco1, I attached snapshot from Excel to my prev post to show the case  (A and B).
May be I can extend HitTest function to analyze previous column and make selection.
Still even in your non-eco mode case what will you do if you will havve say 20 AllDay events?
Still need scroll - so it will be similar to eco-mode but with more events to show at once.
Back to Top
Marco1 View Drop Down
Senior Member
Senior Member


Joined: 16 January 2004
Location: Germany
Status: Offline
Points: 251
Post Options Post Options   Thanks (0) Thanks(0)   Quote Marco1 Quote  Post ReplyReply Direct Link To This Post Posted: 14 October 2009 at 11:52am
Mark, I understand the scrolling problem and totally agree with you, but this is not the issue here. Problem is, as you say, the failing/wrong HitTest.
However, regardless how many AllDayEvents there are, if I click anywhere on one, it should get selected (or edited, whatever).
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 14 October 2009 at 12:44pm
Right but why you not confirm that Microsoft do the same in Excel - I see content in B1 but my click on B1 do nothing while click on A1 initiate editor
Back to Top
Marco1 View Drop Down
Senior Member
Senior Member


Joined: 16 January 2004
Location: Germany
Status: Offline
Points: 251
Post Options Post Options   Thanks (0) Thanks(0)   Quote Marco1 Quote  Post ReplyReply Direct Link To This Post Posted: 14 October 2009 at 1:26pm
I confirm MS does this in Excel, but this is not Excel - it's a calendar like Outlook - and there MS doesn't do it.
Anyway it's way of inconsitent, because I can select a multiday event on its last day, if there is only one (per day)...

Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 14 October 2009 at 2:11pm
Please try Outlook2003 and add say 23 AllDay events - see how it works....
Back to Top
Marco1 View Drop Down
Senior Member
Senior Member


Joined: 16 January 2004
Location: Germany
Status: Offline
Points: 251
Post Options Post Options   Thanks (0) Thanks(0)   Quote Marco1 Quote  Post ReplyReply Direct Link To This Post Posted: 17 October 2009 at 2:37pm
So, will this be fixed? E.g. in 13.2?

Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 17 October 2009 at 3:18pm

I am not sure that this is a good reason to delay 13.2 - it still minor and you report about it very recently. Let's see - may be this fix will go to next upgrade but in the moment I will fix it - I will publish code update and you will get it as all MFC users - I keep permanent link to most recent updates here: https://forum.codejock.com/uploads/DemoVersion/CalendarControlMFCUpdated.rar

Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 18 October 2009 at 11:42am
You can try my current fix for your case - https://forum.codejock.com/uploads/DemoVersion/CalendarControlMFCUpdated.rar
Please give me your opinion
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 18 October 2009 at 11:51am
Back to Top
Marco1 View Drop Down
Senior Member
Senior Member


Joined: 16 January 2004
Location: Germany
Status: Offline
Points: 251
Post Options Post Options   Thanks (0) Thanks(0)   Quote Marco1 Quote  Post ReplyReply Direct Link To This Post Posted: 19 October 2009 at 4:50pm
No, Mark, as far as I can see after a quick test this fix causes new problems.
In your demo I create a 3 day AllDayEvent from 19.10.2009 to 21.10.2009.
Then I try to select the background of 20.10 to 22.10.2009 to create a new event. But selecting the (empty) background causes another event to get selected and dragged. Not good at all. :-(

Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 19 October 2009 at 5:08pm
If you need to select background for multiday event - use Shift while you make selection - it will take proper range for new event in event editor and keep Shift during double click to call event Editor or use context menu AddEvent in this case.
Back to Top
Marco1 View Drop Down
Senior Member
Senior Member


Joined: 16 January 2004
Location: Germany
Status: Offline
Points: 251
Post Options Post Options   Thanks (0) Thanks(0)   Quote Marco1 Quote  Post ReplyReply Direct Link To This Post Posted: 01 November 2009 at 5:48pm
Mark, I still have trouble with wrong selections. Tested with your actual demo code. See image below.
3 AllDeyEvents created.
If you click in 10/29/09 AllDayEvent area (arrow head), NOT on an event, event "test2" gets selected, same for "test3".
So I guess there's still a bug in the hittest logic.


Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 02 November 2009 at 10:19am
Please retest your case with updated version of - https://forum.codejock.com/uploads/DemoVersion/CalendarDemoStatic.rar
Back to Top
Marco1 View Drop Down
Senior Member
Senior Member


Joined: 16 January 2004
Location: Germany
Status: Offline
Points: 251
Post Options Post Options   Thanks (0) Thanks(0)   Quote Marco1 Quote  Post ReplyReply Direct Link To This Post Posted: 03 November 2009 at 11:46am
Retested. Sorry, still not there.
Take your actual example, provide data and try to select the all day area on Nov 04, 2009 (or on 05) ABOVE the "AllDay Event; Old Location" - not possible.
Below seems to work.

Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 03 November 2009 at 12:22pm

So use bottom part for selection in this case

Back to Top
Marco1 View Drop Down
Senior Member
Senior Member


Joined: 16 January 2004
Location: Germany
Status: Offline
Points: 251
Post Options Post Options   Thanks (0) Thanks(0)   Quote Marco1 Quote  Post ReplyReply Direct Link To This Post Posted: 05 November 2009 at 9:20am
Originally posted by mdoubson mdoubson wrote:

So use bottom part
Bottom part?? As "workaround"?!
I still think, it's a bug there. If one clicks in an area and nothing/something else gets selected, that's not okay and should be fixed (and tested well).

Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 06 November 2009 at 6:00pm
There is no false Event selection. There are many ways to create new all day event - background highlighting on click - just one of many.
Back to Top
Marco1 View Drop Down
Senior Member
Senior Member


Joined: 16 January 2004
Location: Germany
Status: Offline
Points: 251
Post Options Post Options   Thanks (0) Thanks(0)   Quote Marco1 Quote  Post ReplyReply Direct Link To This Post Posted: 18 November 2009 at 5:00am
Originally posted by mdoubson mdoubson wrote:

There is no false Event selection. There are many ways to create new all day event
Yes, indeed there are multiple ways for selection. But actually there's still a bug/misbehavior in the hittest/selection I described above.
Please make a more detailed test!

Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 18 November 2009 at 11:49pm

I repeat as you don't wan't to cofirm it - there is no false event selection. Click on bottom part of AllDay area to select empty AllDay space as potential new event - this is a rule to follow - put it in your user manual. Very simple.

Back to Top
Marco1 View Drop Down
Senior Member
Senior Member


Joined: 16 January 2004
Location: Germany
Status: Offline
Points: 251
Post Options Post Options   Thanks (0) Thanks(0)   Quote Marco1 Quote  Post ReplyReply Direct Link To This Post Posted: 14 January 2010 at 9:20am
Mark, seems to be fixed in your latest demo version, nice.
Thanx! Hopes it makes its way in 13.2.2

(please, don't change back again)

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.