![]() Gravitybox Schedule.NET
1998-2005 Gravitybox Software LLC
Page 83 of 90
How do I toggle the schedule time format between the 12 and 24-hour clock?
Different countries have different clock formats. The schedule will display time in both
the 12-hour or 24-hour clock formats. Use the ClockSetting property to change the
time format.
Schedule1.ClockSetting = _
Gravitybox.Controls.Schedule.ClockSettingConstants.Clock12
How do I resize column and row header in code?
The user may resize the column and row header in code by using the two objects:
ColumnHeader and RowHeader. Each has a size property that is measured in pixels.
Set the size of each using this property.
Schedule1.RowHeader.Size = 30
Schedule1.ColumnHeader.Size = 80
How do I make the columns (or rows) resize automatically?
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?
|