Print Page | Close Window

Select Event via Code

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=15571
Printed Date: 17 June 2024 at 1:26am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Select Event via Code
Posted By: AndyWilton
Subject: Select Event via Code
Date Posted: 09 November 2009 at 10:46am
Hi All,
 
Does anybody know how I can select an event in the Calendar via code.
 
I've tried the "SelectEventByID" method but this only highlights the cell behind the event, it doesn't actually select it as though the user has selected it via the mouse.
 
Regards,
 
Andy
 


-------------
Product: Xtreme SuitePro (ActiveX) v11.2.1 -> v15.2.1
Platform: Windows XP / Vista / Win 7
Language: Clarion 5.5 -> C8.x
======================================
Andy Wilton



Replies:
Posted By: mdoubson
Date Posted: 09 November 2009 at 11:12am
You right - this function find event and ensure eisibility. I can add a line of code to select founded event.

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


Posted By: mdoubson
Date Posted: 09 November 2009 at 3:57pm
Try updated ocx please - https://forum.codejock.com/uploads/BetaOCX/CalendarBeta13-2.rar - https://forum.codejock.com/uploads/BetaOCX/CalendarBeta13-2.rar [rev98..]

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


Posted By: AndyWilton
Date Posted: 10 November 2009 at 5:02am
Hi Mark,
 
That would be great if it could visibily select the event  - Cheers!
 
Regards,
 
Andy


-------------
Product: Xtreme SuitePro (ActiveX) v11.2.1 -> v15.2.1
Platform: Windows XP / Vista / Win 7
Language: Clarion 5.5 -> C8.x
======================================
Andy Wilton


Posted By: AndyWilton
Date Posted: 11 November 2009 at 5:45am
Hi Mark,
 
I've just tried it and it works a treat!
 
 
Thanks for the fast response.
 
Regards,
 
Andy


-------------
Product: Xtreme SuitePro (ActiveX) v11.2.1 -> v15.2.1
Platform: Windows XP / Vista / Win 7
Language: Clarion 5.5 -> C8.x
======================================
Andy Wilton


Posted By: AndyWilton
Date Posted: 11 November 2009 at 1:37pm
Hi Mark,
 
One quick question - why does it switch the view to the DAY view in order to select an event?
 
If the event is already visible - can the view remain in its current state?
 
Regards,
 
Andy


-------------
Product: Xtreme SuitePro (ActiveX) v11.2.1 -> v15.2.1
Platform: Windows XP / Vista / Win 7
Language: Clarion 5.5 -> C8.x
======================================
Andy Wilton


Posted By: mdoubson
Date Posted: 11 November 2009 at 1:42pm
You can store prev ViewType befre SelectEventByID call and set it again after selection done - it will kept in new view also.
I consider DayView as most informative one - so it is logical to use it as result of requst


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


Posted By: AndyWilton
Date Posted: 07 September 2010 at 10:32am

Hi Mark,

 

I've just thought of an issue with this....

 

Storing and resetting the ViewType will work unless you are in Day View and you have more than one Day selected (eg, 01, 02 and 03).  Resetting the view type to Day View will only display 1 day which is the day of the Selected event.

 

You can interrogate the current days on show using the ActiveView.Days(....) properties but you can't set the days using these because they are Read Only properties.

 

Any ideas how I can reset the view after using the "SelectEventByID" method but put it back to Day view with multiple days on show?

 

Regards,

 

Andy



-------------
Product: Xtreme SuitePro (ActiveX) v11.2.1 -> v15.2.1
Platform: Windows XP / Vista / Win 7
Language: Clarion 5.5 -> C8.x
======================================
Andy Wilton



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