Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #803 > unrolled thread
| Started by | D.J.W. van Kooten <public@ic2remove.this.com> |
|---|---|
| First post | 2011-04-11 23:37 +0200 |
| Last post | 2011-04-11 22:17 +0000 |
| Articles | 8 — 5 participants |
Back to article view | Back to comp.lang.clipper.visual-objects
Drag drop Monthcalendar : how to detect the date D.J.W. van Kooten <public@ic2remove.this.com> - 2011-04-11 23:37 +0200
Re: Drag drop Monthcalendar : how to detect the date "Stephen Quinn" <stevejqNO@bigpondSPAM.net.au> - 2011-04-12 08:14 +1000
Re: Drag drop Monthcalendar : how to detect the date D.J.W. van Kooten <public@ic2remove.this.com> - 2011-04-12 01:23 +0200
Re: Drag drop Monthcalendar : how to detect the date Massimo Bighelli <info@arcasistemi.it> - 2011-04-12 02:02 +0200
Re: Drag drop Monthcalendar : how to detect the date "Willie Moore" <williem@wmconsulting.com> - 2011-04-11 21:33 -0500
Re: Drag drop Monthcalendar : how to detect the date Massimo Bighelli <info@arcasistemi.it> - 2011-04-12 15:44 +0200
Re: Drag drop Monthcalendar : how to detect the date "Willie Moore" <williem@wmconsulting.com> - 2011-04-12 15:00 -0500
Re: Drag drop Monthcalendar : how to detect the date "Geoff Schaller" <geoffx@softwarexobjectives.com.au> - 2011-04-11 22:17 +0000
| From | D.J.W. van Kooten <public@ic2remove.this.com> |
|---|---|
| Date | 2011-04-11 23:37 +0200 |
| Subject | Drag drop Monthcalendar : how to detect the date |
| Message-ID | <fps6q6lutcv9qb4t09k5k29blj3p0fjnpo@4ax.com> |
When we drag-drop an item on the monthcalendar we can get the coordinates of the place on the control where we dropped the item, but not the date (in the METHOD CellDragDrop). Basically, the selecteddate does not change like when you click into the control. I've seen a suggestion to simulate a mousedoubleclick on the coordinates but I don't how to do that either. How can we get the date with drag drop or simulate a mouseclick? Dick
[toc] | [next] | [standalone]
| From | "Stephen Quinn" <stevejqNO@bigpondSPAM.net.au> |
|---|---|
| Date | 2011-04-12 08:14 +1000 |
| Message-ID | <73Lop.1108$CS3.686@viwinnwfe01.internal.bigpond.com> |
| In reply to | #803 |
Dick > How can we get the date with drag drop or simulate a mouseclick? You don't say WHERE your dragging this date from though nor what format it's in. CYA Steve
[toc] | [prev] | [next] | [standalone]
| From | D.J.W. van Kooten <public@ic2remove.this.com> |
|---|---|
| Date | 2011-04-12 01:23 +0200 |
| Message-ID | <8s27q6dmdoevr3pb4upq3sk9ta6q4up7sa@4ax.com> |
| In reply to | #804 |
On Tue, 12 Apr 2011 08:14:46 +1000, "Stephen Quinn"
<stevejqNO@bigpondSPAM.net.au> wrote:
Hello Steve,
>
>You don't say WHERE your dragging this date from though nor what format it's
>in.
>
Basically we do the same as in Outlook 2010: drag a bBrowser line
(containing an e-mail) to a date to invoke a planning item on that
date, Everything works fine but wheras the treeview (on which we also
drop e-mail lines) has this:
oTVI := SELF:oDCEmailTreeview:GetItemAtPosition (oPoint) (allowing us
to translate coordinates to a knode in the treeview)
the Monthcalendar control (which is NOT the datetimepicker Geoff, and
not the RightSLE) does NOT have that.
I hope that there is a simpler solution than trying to calculate the
date from that position ourselves. It seems to be a problem outside VO
as well. I saw this suggestion, simulating a mouse doubleclick on the
coordinates found:
Point loc = monthCalendar1.PointToClient(new Point(e.X, e.Y));
IntPtr lp = (IntPtr)(loc.X | (loc.Y << 16));
SendMessage(monthCalendar1.Handle, 0x201, IntPtr.Zero, lp);
SendMessage(monthCalendar1.Handle, 0x202, IntPtr.Zero, lp);
but I don't know how to translate that to VO.
So basically what is dragged to the control is not really important.
The fact that we know that something is dragged means we could open
our planning item screen, if only we we had a GetItemAtPosition for
the monthcalendar.
Dick
[toc] | [prev] | [next] | [standalone]
| From | Massimo Bighelli <info@arcasistemi.it> |
|---|---|
| Date | 2011-04-12 02:02 +0200 |
| Message-ID | <io04rh$9t4$1@speranza.aioe.org> |
| In reply to | #810 |
Dick, I don't know if there is a solution for the monthcalendar, AFAIK there is not drag/drop in MC For this reason we adopted the PECalendar from RightSLE (THX Willie) and adapted for drag and drop... and with a minor change in order to avoid the closure of the calendar when click easy, few minutes work. Massimo Il 12/04/2011 01:23, D.J.W. van Kooten ha scritto: > On Tue, 12 Apr 2011 08:14:46 +1000, "Stephen Quinn" > <stevejqNO@bigpondSPAM.net.au> wrote: > > Hello Steve, >> >> You don't say WHERE your dragging this date from though nor what format it's >> in. >> > Basically we do the same as in Outlook 2010: drag a bBrowser line > (containing an e-mail) to a date to invoke a planning item on that > date, Everything works fine but wheras the treeview (on which we also > drop e-mail lines) has this: > > oTVI := SELF:oDCEmailTreeview:GetItemAtPosition (oPoint) (allowing us > to translate coordinates to a knode in the treeview) > > the Monthcalendar control (which is NOT the datetimepicker Geoff, and > not the RightSLE) does NOT have that. > > I hope that there is a simpler solution than trying to calculate the > date from that position ourselves. It seems to be a problem outside VO > as well. I saw this suggestion, simulating a mouse doubleclick on the > coordinates found: > > Point loc = monthCalendar1.PointToClient(new Point(e.X, e.Y)); > IntPtr lp = (IntPtr)(loc.X | (loc.Y<< 16)); > SendMessage(monthCalendar1.Handle, 0x201, IntPtr.Zero, lp); > SendMessage(monthCalendar1.Handle, 0x202, IntPtr.Zero, lp); > > but I don't know how to translate that to VO. > > So basically what is dragged to the control is not really important. > The fact that we know that something is dragged means we could open > our planning item screen, if only we we had a GetItemAtPosition for > the monthcalendar. > > Dick
[toc] | [prev] | [next] | [standalone]
| From | "Willie Moore" <williem@wmconsulting.com> |
|---|---|
| Date | 2011-04-11 21:33 -0500 |
| Message-ID | <io0dld$uad$1@speranza.aioe.org> |
| In reply to | #811 |
Massimo, If you will send me the changed module and a test program that demonstrates the drag drop into a calendar I will be happy to incorporate it into rightSLE. Regards, Willie "Massimo Bighelli" wrote in message news:io04rh$9t4$1@speranza.aioe.org... Dick, I don't know if there is a solution for the monthcalendar, AFAIK there is not drag/drop in MC For this reason we adopted the PECalendar from RightSLE (THX Willie) and adapted for drag and drop... and with a minor change in order to avoid the closure of the calendar when click easy, few minutes work. Massimo Il 12/04/2011 01:23, D.J.W. van Kooten ha scritto: > On Tue, 12 Apr 2011 08:14:46 +1000, "Stephen Quinn" > <stevejqNO@bigpondSPAM.net.au> wrote: > > Hello Steve, >> >> You don't say WHERE your dragging this date from though nor what format >> it's >> in. >> > Basically we do the same as in Outlook 2010: drag a bBrowser line > (containing an e-mail) to a date to invoke a planning item on that > date, Everything works fine but wheras the treeview (on which we also > drop e-mail lines) has this: > > oTVI := SELF:oDCEmailTreeview:GetItemAtPosition (oPoint) (allowing us > to translate coordinates to a knode in the treeview) > > the Monthcalendar control (which is NOT the datetimepicker Geoff, and > not the RightSLE) does NOT have that. > > I hope that there is a simpler solution than trying to calculate the > date from that position ourselves. It seems to be a problem outside VO > as well. I saw this suggestion, simulating a mouse doubleclick on the > coordinates found: > > Point loc = monthCalendar1.PointToClient(new Point(e.X, e.Y)); > IntPtr lp = (IntPtr)(loc.X | (loc.Y<< 16)); > SendMessage(monthCalendar1.Handle, 0x201, IntPtr.Zero, lp); > SendMessage(monthCalendar1.Handle, 0x202, IntPtr.Zero, lp); > > but I don't know how to translate that to VO. > > So basically what is dragged to the control is not really important. > The fact that we know that something is dragged means we could open > our planning item screen, if only we we had a GetItemAtPosition for > the monthcalendar. > > Dick
[toc] | [prev] | [next] | [standalone]
| From | Massimo Bighelli <info@arcasistemi.it> |
|---|---|
| Date | 2011-04-12 15:44 +0200 |
| Message-ID | <io1l0n$a0f$1@speranza.aioe.org> |
| In reply to | #813 |
Willie, I sent all this to you at that time... with the first holidays implementation by me (preloaded array) with english comments and my name as bookmark in order to find the changes. I don't remember if my module is syncronized with your new version. I remember that I tested the modified PECalendar into ToDo example, dragging listviewitem on the calendar... I will see what I can assemble THX Massimo Il 12/04/2011 04:33, Willie Moore ha scritto: > Massimo, > > If you will send me the changed module and a test program that > demonstrates the drag drop into a calendar I will be happy to > incorporate it into rightSLE. > > Regards, > Willie > > "Massimo Bighelli" wrote in message news:io04rh$9t4$1@speranza.aioe.org... > > Dick, > > I don't know if there is a solution for the monthcalendar, AFAIK there > is not drag/drop in MC > For this reason we adopted the PECalendar from RightSLE (THX Willie) and > adapted for drag and drop... and with a minor change in order to avoid > the closure of the calendar when click > > easy, few minutes work. > > Massimo > > > > Il 12/04/2011 01:23, D.J.W. van Kooten ha scritto: >> On Tue, 12 Apr 2011 08:14:46 +1000, "Stephen Quinn" >> <stevejqNO@bigpondSPAM.net.au> wrote: >> >> Hello Steve, >>> >>> You don't say WHERE your dragging this date from though nor what >>> format it's >>> in. >>> >> Basically we do the same as in Outlook 2010: drag a bBrowser line >> (containing an e-mail) to a date to invoke a planning item on that >> date, Everything works fine but wheras the treeview (on which we also >> drop e-mail lines) has this: >> >> oTVI := SELF:oDCEmailTreeview:GetItemAtPosition (oPoint) (allowing us >> to translate coordinates to a knode in the treeview) >> >> the Monthcalendar control (which is NOT the datetimepicker Geoff, and >> not the RightSLE) does NOT have that. >> >> I hope that there is a simpler solution than trying to calculate the >> date from that position ourselves. It seems to be a problem outside VO >> as well. I saw this suggestion, simulating a mouse doubleclick on the >> coordinates found: >> >> Point loc = monthCalendar1.PointToClient(new Point(e.X, e.Y)); >> IntPtr lp = (IntPtr)(loc.X | (loc.Y<< 16)); >> SendMessage(monthCalendar1.Handle, 0x201, IntPtr.Zero, lp); >> SendMessage(monthCalendar1.Handle, 0x202, IntPtr.Zero, lp); >> >> but I don't know how to translate that to VO. >> >> So basically what is dragged to the control is not really important. >> The fact that we know that something is dragged means we could open >> our planning item screen, if only we we had a GetItemAtPosition for >> the monthcalendar. >> >> Dick >
[toc] | [prev] | [next] | [standalone]
| From | "Willie Moore" <williem@wmconsulting.com> |
|---|---|
| Date | 2011-04-12 15:00 -0500 |
| Message-ID | <io2b09$csm$1@speranza.aioe.org> |
| In reply to | #822 |
Massimo, I have probable done it then. I was thinking that it new code. I have forgotten a lot over the years <grin>. It took the original holiday code and really extended it so it could be dynamically reloaded. Regards, Willie "Massimo Bighelli" wrote in message news:io1l0n$a0f$1@speranza.aioe.org... Willie, I sent all this to you at that time... with the first holidays implementation by me (preloaded array) with english comments and my name as bookmark in order to find the changes. I don't remember if my module is syncronized with your new version. I remember that I tested the modified PECalendar into ToDo example, dragging listviewitem on the calendar... I will see what I can assemble THX Massimo Il 12/04/2011 04:33, Willie Moore ha scritto: > Massimo, > > If you will send me the changed module and a test program that > demonstrates the drag drop into a calendar I will be happy to > incorporate it into rightSLE. > > Regards, > Willie > > "Massimo Bighelli" wrote in message news:io04rh$9t4$1@speranza.aioe.org... > > Dick, > > I don't know if there is a solution for the monthcalendar, AFAIK there > is not drag/drop in MC > For this reason we adopted the PECalendar from RightSLE (THX Willie) and > adapted for drag and drop... and with a minor change in order to avoid > the closure of the calendar when click > > easy, few minutes work. > > Massimo > > > > Il 12/04/2011 01:23, D.J.W. van Kooten ha scritto: >> On Tue, 12 Apr 2011 08:14:46 +1000, "Stephen Quinn" >> <stevejqNO@bigpondSPAM.net.au> wrote: >> >> Hello Steve, >>> >>> You don't say WHERE your dragging this date from though nor what >>> format it's >>> in. >>> >> Basically we do the same as in Outlook 2010: drag a bBrowser line >> (containing an e-mail) to a date to invoke a planning item on that >> date, Everything works fine but wheras the treeview (on which we also >> drop e-mail lines) has this: >> >> oTVI := SELF:oDCEmailTreeview:GetItemAtPosition (oPoint) (allowing us >> to translate coordinates to a knode in the treeview) >> >> the Monthcalendar control (which is NOT the datetimepicker Geoff, and >> not the RightSLE) does NOT have that. >> >> I hope that there is a simpler solution than trying to calculate the >> date from that position ourselves. It seems to be a problem outside VO >> as well. I saw this suggestion, simulating a mouse doubleclick on the >> coordinates found: >> >> Point loc = monthCalendar1.PointToClient(new Point(e.X, e.Y)); >> IntPtr lp = (IntPtr)(loc.X | (loc.Y<< 16)); >> SendMessage(monthCalendar1.Handle, 0x201, IntPtr.Zero, lp); >> SendMessage(monthCalendar1.Handle, 0x202, IntPtr.Zero, lp); >> >> but I don't know how to translate that to VO. >> >> So basically what is dragged to the control is not really important. >> The fact that we know that something is dragged means we could open >> our planning item screen, if only we we had a GetItemAtPosition for >> the monthcalendar. >> >> Dick >
[toc] | [prev] | [next] | [standalone]
| From | "Geoff Schaller" <geoffx@softwarexobjectives.com.au> |
|---|---|
| Date | 2011-04-11 22:17 +0000 |
| Message-ID | <4da37e15$0$33416$c30e37c6@exi-reader.telstra.net> |
| In reply to | #803 |
Dick, I presume you are talking about PECalendar... or the one that comes in RightSLE (you obviously aren't talking about datetimepicker etc - such things would be impossible). Basically it is a predictable grid - you have all the source code. In the DrawDays method you have the calculations for where to place each day and so you have a bounding box of coordinates for each cell. Hence you can compute the date back from the position of the mouse. Alternately you can get the current row/col/date from existing methods if focus has been put into the control somehow (like with drag and drop). The bbrowser source has methods that convert screen cords to mouse and vice versa. Geoff "D.J.W. van Kooten" <public@ic2remove.this.com> wrote in message news:fps6q6lutcv9qb4t09k5k29blj3p0fjnpo@4ax.com: > When we drag-drop an item on the monthcalendar we can get the > coordinates of the place on the control where we dropped the item, but > not the date (in the METHOD CellDragDrop). Basically, the selecteddate > does not change like when you click into the control. I've seen a > suggestion to simulate a mousedoubleclick on the coordinates but I > don't how to do that either. > > How can we get the date with drag drop or simulate a mouseclick? > > Dick
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.clipper.visual-objects
csiph-web