Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Item Visibility (Read 3205 times)
DoctorsDad
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 20
Joined: May 19th, 2011
Item Visibility
Jun 17th, 2011 at 11:43am
Print Post  
I want to programatically cause an appointment in my Calendar Resource View to be moved into view. The .visible property doesn't appear to be the way to do this.

How can I tell whether a specific item is currently visible to the user and then cause the view to scroll until the item is displayed?

DoctorsDad
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Item Visibility
Reply #1 - Jun 17th, 2011 at 11:54am
Print Post  
Try calling the Calendar.EnsureVisible(Item) method, passing a reference to the item of interest. The item needs to be currently accessible through the scrollbars however. If the item is outside of the view's date range, the method will have no effect.

Regards,
Meppy
  
Back to top
 
IP Logged
 
DoctorsDad
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 20
Joined: May 19th, 2011
Re: Item Visibility
Reply #2 - Jun 17th, 2011 at 12:15pm
Print Post  
Okay, I have a button which does this.


For it As Integer = 0 To Calendar1.Schedule.Items.Count - 1
Dim a As MindFusion.Scheduling.Appointment = Calendar1.Schedule.Items(it)
If a.Tag = currentRow.Tag Then
Debug.Print("Got It")
Calendar1.EnsureVisible(Calendar1.Schedule.Items(it))
End If
Next


I'm getting the debug prints but the calendar is not scrolling the appointment into view. Are there any settings I should check?
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Item Visibility
Reply #3 - Jun 17th, 2011 at 1:06pm
Print Post  
Is it possible that EnsureVisible is invoked more than once, thus giving the impression that it's not working properly? I'm testing here and the method seems to be working as expected.

In any case, I will appreciate it if you can send me an application (to meppy@mindfusion.eu), which reproduces the problem so I can check what might be wrong.

Regards,
Meppy
  
Back to top
 
IP Logged
 
DoctorsDad
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 20
Joined: May 19th, 2011
Re: Item Visibility
Reply #4 - Jun 21st, 2011 at 8:11am
Print Post  
Just wanted to put on record the outcome of this for other people.

I emailed Meppy a demo project and very shortly afterwards received an updated component and helpful hints.

My problem is now resolved and I am very pleased with the service provided.

Many thanks to Meppy and the team.

DoctorsDad
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint