Hi Guys,
How could I find out which appointment is under the mouse-down event? I am trying to find out which appointment the user right-clicked on.
The TimeLineView (winforms) does not have a .GetAppointmentFromPoint(e.X, e.Y); method?
Regds
Paul
Hi Paul,
Not sure if this will work for the mouse down event, but I'm using this in the ultradayview_dragdrop event
TimeSlot ts = this.ultraDayView1.GetTimeSlotFromPoint(this.ultraDayView1.PointToClient(new Point(e.X, e.Y))); DateTime dt = this.ultraDayView1.GetVisibleDayFromPoint(this.ultraDayView1.PointToClient(new Point(e.X, e.Y))).Date;
Gives me the date and time of the slot where i can drag drop stuff.
Thanks,
Karthik
Hi Karthik
THANKS FOR YOUR REPLY. I JUST FOUND IT THANKS! Its a bit diff on the timelineview...this.ultraTimelineView1.AppointmentFromPoint(point);
private void ultraTimelineView1_MouseDown(object sender, MouseEventArgs e)
{
if (e.Button != System.Windows.Forms.MouseButtons.Right)
return;
System.Drawing.Point point = new System.Drawing.Point(e.X, e.Y);
// Determine where in the control the right button was pressed
Appointment objAppointment = null;
objAppointment = this.ultraTimelineView1.AppointmentFromPoint(point);
if (objAppointment != null)
// objAppointment found
var tt = objAppointment.Tag as RamperTask;
MessageBox.Show("Appointment " + objAppointment.Subject.ToString() + "ID:" + tt.ComingInRMLegID );
}
Hello All,
Thank you for posting your answers and ideas. If anyone has any additional questions feel free to create a new forum and post your link it here as reference. Thanks again.