Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Calendar
  New Posts New Posts RSS Feed - Select Event via Code
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Select Event via Code

 Post Reply Post Reply
Author
Message
AndyWilton View Drop Down
Groupie
Groupie
Avatar

Joined: 03 June 2008
Status: Offline
Points: 82
Post Options Post Options   Thanks (0) Thanks(0)   Quote AndyWilton Quote  Post ReplyReply Direct Link To This Post Topic: Select Event via Code
    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
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 09 November 2009 at 3:57pm
Back to Top
AndyWilton View Drop Down
Groupie
Groupie
Avatar

Joined: 03 June 2008
Status: Offline
Points: 82
Post Options Post Options   Thanks (0) Thanks(0)   Quote AndyWilton Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
AndyWilton View Drop Down
Groupie
Groupie
Avatar

Joined: 03 June 2008
Status: Offline
Points: 82
Post Options Post Options   Thanks (0) Thanks(0)   Quote AndyWilton Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
AndyWilton View Drop Down
Groupie
Groupie
Avatar

Joined: 03 June 2008
Status: Offline
Points: 82
Post Options Post Options   Thanks (0) Thanks(0)   Quote AndyWilton Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
AndyWilton View Drop Down
Groupie
Groupie
Avatar

Joined: 03 June 2008
Status: Offline
Points: 82
Post Options Post Options   Thanks (0) Thanks(0)   Quote AndyWilton Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.