Print Page | Close Window

Trouble selecting AllDayEvent

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Calendar
Forum Description: Topics Related to Codejock Calendar
URL: http://forum.codejock.com/forum_posts.asp?TID=15345
Printed Date: 21 November 2024 at 3:01pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Trouble selecting AllDayEvent
Posted By: Marco1
Subject: Trouble selecting AllDayEvent
Date 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




Replies:
Posted By: mdoubson
Date Posted: 13 October 2009 at 12:34pm
I tried your case with same demo - https://forum.codejock.com/uploads/DemoVersion/CalendarDemoStatic.rar - 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.
 


-------------
Mark Doubson, Ph.D.


Posted By: Marco1
Date 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.




Posted By: mdoubson
Date 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:


-------------
Mark Doubson, Ph.D.


Posted By: Marco1
Date 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.



Posted By: mdoubson
Date 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
 


-------------
Mark Doubson, Ph.D.


Posted By: Marco1
Date 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.



-------------
Product: XTP 18.3.0 on VS 2017
Platform: VS 2017 / Windows 10 (64bit)


Posted By: mdoubson
Date 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.


-------------
Mark Doubson, Ph.D.


Posted By: Marco1
Date 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).


Posted By: mdoubson
Date 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

-------------
Mark Doubson, Ph.D.


Posted By: Marco1
Date 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)...



Posted By: mdoubson
Date Posted: 14 October 2009 at 2:11pm
Please try Outlook2003 and add say 23 AllDay events - see how it works....

-------------
Mark Doubson, Ph.D.


Posted By: Marco1
Date Posted: 17 October 2009 at 2:37pm
So, will this be fixed? E.g. in 13.2?



Posted By: mdoubson
Date 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 - https://forum.codejock.com/uploads/DemoVersion/CalendarControlMFCUpdated.rar



-------------
Mark Doubson, Ph.D.


Posted By: mdoubson
Date Posted: 18 October 2009 at 11:42am
You can try my current fix for your case - https://forum.codejock.com/uploads/DemoVersion/CalendarControlMFCUpdated.rar - https://forum.codejock.com/uploads/DemoVersion/CalendarControlMFCUpdated.rar
Please give me your opinion


-------------
Mark Doubson, Ph.D.


Posted By: mdoubson
Date Posted: 18 October 2009 at 11:51am

I also updated sample with current code - https://forum.codejock.com/uploads/DemoVersion/CalendarDemoStatic.rar - https://forum.codejock.com/uploads/DemoVersion/CalendarDemoStatic.rar



-------------
Mark Doubson, Ph.D.


Posted By: Marco1
Date 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. :-(



Posted By: mdoubson
Date 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.

-------------
Mark Doubson, Ph.D.


Posted By: Marco1
Date 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.




Posted By: mdoubson
Date Posted: 02 November 2009 at 10:19am
Please retest your case with updated version of - https://forum.codejock.com/uploads/DemoVersion/CalendarDemoStatic.rar - https://forum.codejock.com/uploads/DemoVersion/CalendarDemoStatic.rar

-------------
Mark Doubson, Ph.D.


Posted By: Marco1
Date 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.



Posted By: mdoubson
Date Posted: 03 November 2009 at 12:22pm

So use bottom part for selection in this case



-------------
Mark Doubson, Ph.D.


Posted By: Marco1
Date 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).



Posted By: mdoubson
Date 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.

-------------
Mark Doubson, Ph.D.


Posted By: Marco1
Date 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!



Posted By: mdoubson
Date 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.



-------------
Mark Doubson, Ph.D.


Posted By: Marco1
Date 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)




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net