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

Gravitybox Schedule Primer
Page 78 
1998-2004 Gravitybox Software LLC
Figure 7.1
In the Figure 7.1, the date Jun 8 is not completely visible. Though the starting edge is
visible, its end edge is beyond the view port. If the IsDayVisible function were to be
called with this date, it would return false, since the entire room is not visible.
This functionality may be used to add search capability to an application. Let the user
specify a date to which to move. On a large schedule this functionality is almost
mandatory. An application that requires a user to scroll for over 300 columns (days) to
get to a known point is not a very efficient application.
IsRoomVisible
When dealing with many rooms, there may be more rows
(or columns) than can be displayed in the view port of the
schedule. This IsRoomVisible method allows for the
checking of visibility of any Room object. Given a Room object’s index or name, the
method returns a Boolean value that determines the visibility of the specified Room
object. As with the IsDayVisible method, if a room is only partially visible, this method
returns false. The start edge to the end edge must be in the view port for a return value
of true.
If Not Schedule1.IsRoomVisible("Room1") Then
  ....
  'What to do if NOT visible
  ....
End If
This functionality may be used to add search capability to an application as well. This
will probably not be such an issue, since there will probably not be very many rooms on
a schedule. However, the Rooms collection may represent any group of objects. Rooms
may be a group of Trucks. The Rooms collection would be labeled “Trucks” and treated
as such. This collection allows for the addition of any item. So there may be many items
in this collection after all. For this reason, “IsVisible” and “Show” methods are defined
for the Rooms collection as well.
Quick Tip
You may check if a room is in the
viewable area by using the
“IsRoomVisible” property.
http://www.purepage.com