Navigation bar
  Home Print document Start Previous page
 82 of 234 
Next page End  

Gravitybox Schedule Primer
Page 80 
1998-2004 Gravitybox Software LLC
ShowTime
This is the complement function of the IsTimeVisible method. This method may be used
in the same fashion as the ShowDay and ShowRoom methods. Given a valid time, the
method will bring the time into the view port. It may not necessarily be the time
displayed at the top of the screen. The displayed top time will depend on the length of
the total schedule and other factors.
If Not Schedule1.IsTimeVisible(#12:00:00 PM#) Then
  Call Schedule1.ShowTime(#12:00:00 PM#)
End If
ShowItem
Another useful method that allows for the display of particular sections of a schedule is
the ShowItem method. It is perhaps the most useful. If the user has search capability,
he will want to display the results of his search. This method is called to make a
particular appointment visible. On large schedules, there will be many appointments,
most of which will probably not be in the view port window. If the user needs to see a
particular appointment, the view port may be scrolled to include the specified
appointment.
Call Schedule1.ShowItem(32)
This code will bring ScheduleItem 32 in the ScheduleItems collection into the view port.
If at least 32 appointments do not exist, in the collection, this method will perform no
action.
This method may be used to define search capability in the following way. There exist
many appointments on the schedule. Each appointment has the client’s (patient’s, etc)
name displayed on it. You may build a screen may be built that loops through the
ScheduleItems collection and displays a list of the patient names from every
appointment. This will be a visual cue to the user of what each appointment represents.
When the user indicates that he wants to edit (view, etc) the item in the X position, this
method may be called with the ScheduleItems’ index X as a parameter. This will ensure
that the specified appointment is in the view port of the schedule.
Private Sub List1_DblClick()
  Call Schedule1.ShowItem(List1.ListIndex + 1)
End Sub
These methods may be used in conjunction with one another to check the visibility of
any place on a schedule. To gain faster performance, the AutoRedraw property of the
schedule may be set to false for multiple method calls that affect screen refreshing. The
property must be set back to true after the methods calls, to ensure that the screen is
http://www.purepage.com