|  | 
| Selecting an event | 
| Post Reply   | 
| Author | |
| tomgriff   Groupie     Joined: 10 August 2006 Status: Offline Points: 25 |  Post Options  Thanks(0)  Quote  Reply  Topic: Selecting an event Posted: 31 August 2006 at 1:37am | 
| 
   Hi,
 I have a problem with selecting an event in the calendar. I have a client database in access.  When I add an appointment in the calendar, I also add the appointment in the Client DB.  I also add the event id to the client db. I show the appointments for each client in a grid on the client info page. I want to dbl-clk on an appointment in the grid and have the calendar open with the appointment selected and centered in  the calendar. I have the calendar opening, and I am using the setselection  to highlight the time for the appointment.  The calendar does not move the select into view if it is late in the day. This is the code I am using on the grid_dbl-clk   frmMain.ShowPanes PANE_APPOINTMENT_CALENDAR With frmAppointmentCalendar .wndDatePicker.EnsureVisible dteApptDate .wndDatePicker.Select dteApptDate .calCalendar.ActiveView.ShowDay dteApptDate .calCalendar.ActiveView.SetSelection ModEvent.StartTime, ModEvent.EndTime, False .calCalendar.RedrawControl End With I am using Calendar 10.2 I would appreciate any help. Thanks in advance. | |
|  | |
| sserge   Moderator Group   Joined: 01 December 2004 Status: Offline Points: 1297 |  Post Options  Thanks(0)  Quote  Reply  Posted: 31 August 2006 at 8:49am | 
| 
   Hi, As far as I understand, you're trying to scroll in a Day view (up or down). In this case you should use DayView.ScrollV method. So, the body of your method could be as follows: 
 -- WBR, Serge | |
|  | |
| tomgriff   Groupie     Joined: 10 August 2006 Status: Offline Points: 25 |  Post Options  Thanks(0)  Quote  Reply  Posted: 31 August 2006 at 12:18pm | 
| 
   Hello,
 Thanks for the help. The DayScroll works perfect for putting the setselection into the calendar veiw when it is late in the day. The thing that is happening is that the appointment (event) is not being selected, the time period behind the appoinment (event) is being selected.  I would like for the actual appointment (event)  to be selected. Once again, thanks for the help. | |
|  | |
| sserge   Moderator Group   Joined: 01 December 2004 Status: Offline Points: 1297 |  Post Options  Thanks(0)  Quote  Reply  Posted: 31 August 2006 at 12:58pm | 
| 
   Ok, if you also want to select this appointment view, add a following piece of code just before calling .Populate: 
 ps: if you also want a top blue selection border to be visible, scroll day view to Cell Number - 1 of event's start time. -- WBR, Serge | |
|  | |
| tomgriff   Groupie     Joined: 10 August 2006 Status: Offline Points: 25 |  Post Options  Thanks(0)  Quote  Reply  Posted: 31 August 2006 at 2:55pm | 
| 
   Thanks for the quick response.
 I will give this a try. This forum is a great resource for the controls. | |
|  | |
| tomgriff   Groupie     Joined: 10 August 2006 Status: Offline Points: 25 |  Post Options  Thanks(0)  Quote  Reply  Posted: 31 August 2006 at 7:09pm | 
| 
   Hello again, 
 I tried the code you sent me in the previous reply. 
 it seems that ve is always nothing, the for each loop is not run, so there is no event selected. I must have something wrong here. | |
|  | |
| Post Reply   | |
| Tweet | 
| Forum Jump | Forum Permissions  You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |