![]() Gravitybox WebSchedule.NET
1998-2005 Gravitybox Software LLC
Page 63 of 65
If you wish for either the rows or columns to resize automatically use the AutoFit
property of the ColumnHeader and RowHeader object. Keep in mind that columns and
rows have a minimum size and the AutoFit will not always fit them perfectly. If you have
200 columns on your schedule, scroll bars will still be necessary and the columns will be
the minimum allowable size. However for smaller sets of data this property will ensure
that the number of columns or rows fits the total schedule area on screen.
Schedule1.RowHeader.AutoFit = True
Schedule1.ColumnHeader.AutoFit = True
How do I determine if the mouse is over an appointment?
If you need to determine if the mouse is over an appointment, use the HitTest method.
This is quite useful in the MouseMove event. You may wish to display some information
when the user moves over an appointment. The following code assumes that it is in the
Schedules MouseMove event. It checks the e parameter to determine if an
appointment is at the coordinates and if so displays a message.
Dim appointment As Gravitybox.Objects.Appointment
appointment = Schedule1.AppointmentCollection.HitTest(e.X, e.Y)
If Not (appointment Is Nothing) Then
Debug.WriteLine(Over an appointment!)
End If
How do I customize conflict displays?
In many cases, conflicting appointments are a part of life. WebSchedule.NET allows you
to display conflicts in three different ways. (1) They can be overlapped. Essentially there
is no processing since an appointment merely overlaps others that conflict. (2) They can
be displayed side-by-side. This ensures that all appointments are seen. Each
appointment is drawn with a smaller width to allow other conflicting appointments to be
seen. (3) An advanced display is staggering. Appointments are slightly overlapped but
their widths as slightly smaller as well. This looks much like the iCal application from
Apple.
Schedule1.ConflictDisplay = _
Gravitybox.Controls.Schedule.ConflictDisplayConstants.Overlap
Schedule1.ConflictDisplay = _
Gravitybox.Controls.Schedule.ConflictDisplayConstants.SideBySide
Schedule1.ConflictDisplay = _
Gravitybox.Controls.Schedule.ConflictDisplayConstants.Stagger
|