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

Gravitybox Schedule Primer
Page 22 
1998-2004 Gravitybox Software LLC
old (now non-existent) Room object. If there is not a second Room and the schedule is
displaying rooms, the appointment will not be displayed.
Categories
The schedule object also has a Categories collection. This collection may be filled with
custom categories that define a business. This functionality is very useful when
categorizing appointments. If the appointments can be grouped into categories, this will
give the users a much better view of the schedule. 
To go back to the doctor’s office demo, say there are three categories, “Surgery”,
“Major”, and “Misc”. These categories are added to this collection and an associated
color with each.
Call Categories.Add("Surgery", vbRed)
Call Categories.Add("Major", vbYellow)
Call Categories.Add("Misc", vbBlue)
Much like the Rooms collection, a Category object may be referenced by its name or
index. Each appointment has a Category property that maps to this collection. An
appointment need not have an associated category, but this functionality is provided for
convenience.
This category information is used to display the appointment with a slightly different
appearance. If its Category property of an appointment maps to a valid object of the
Categories collection, the associated Category object’s color is displayed on the left
side of the appointment. In addition to displaying a category, colored bar on the
appointment, there will be a matching bar in the left margin of the schedule. This allows
the user to see, at a glance, the categories of appointments. In the left margin of the
schedule, there is a column for each defined Category object. When an appointment is
mapped to a Category object, its corresponding color bar, in the left margin, will be filled
for the length of the appointment. This may be toggled on/off by setting the CategoryBar
property of the schedule true or false. If CategoryBar is false, the Categories collection
is not displayed in the left margin of the schedule. The associated mapped colors may
still be displayed on the appointment’s margin by setting the CategoryBar property to
true. There exists a tab set in the top, left corner of the schedule. The top tab must be
“checked” for the Categories collection to be displayed. This effectively puts the
schedule into category mode. This tab is a toggle for the display of Categories or
Providers (as described below).
A Category object’s name may not be numeric. This is because there would be no way
to determine if the parameter being used is a name or an index. Since you may not add
a numeric name the code below is invalid but I use it as an illustration. If an object’s
name were numeric, the following code would produce an error, since there is only one
object in the collection and its name is “100”. When referenced by the name “100”, the
collection will try to return index 100, which does not exist, and produce an error.
http://www.purepage.com