![]() Gravitybox Schedule.NET
1998-2005 Gravitybox Software LLC
Page 79 of 90
Call Schedule1.NoDropAreas.Add(Color.Red, #1/1/2004#)
How do I set the alarm of an appointment in code?
An alarm may be displayed when an appointment comes due. The alarm may be set
from the default property screen or in code. In code it can be set with the code snippet
below.
appointment.Alarm.IsArmed = True
How do I customize an appointment, i.e. make it round, change the color,
Transparency, etc?
An appointment has many properties to customize it appearance. The code snippet
below demonstrates some of them.
'Make the appointment half see-through
appointment.Appearance.Transparency = 50
'Make the backcolor light blue
appointment.Appearance.BackColor = Color.LightBlue
'Make the text color black
appointment.Appearance.ForeColor = Color.Black
'Make the border this a system color
appointment.Appearance.BorderColor = SystemColors.ControlDark
'Make the font bold
appointment.Appearance.FontBold = True
'Draw the appointment as round not rectangle
appointment.Appearance.IsRound = True
Each appointment also has a header object. This object may be used to define a header
for the appointment and set it properties.
'Draw a line under the header
appointment.Header.Appearance.AllowBreak = False
'Make the backcolor red
appointment.Header.Appearance.BackColor = Color.Red
'Draw the appointment's date in the header
appointment.Header.HeaderType =
AppointmentHeader.HeaderTypeConstants.DateHeader
'Set the header icon to the default "Info" icon
appointment.Header.Icon = Schedule1.DefaultIcons.IconInfo
'Make the appointment half see-through
appointment.Header.Appearance.Transparency = 50
How do I determine how many days an appointment spans?
Appointments may overlap any number of day boundaries. To determine the number of
breaks use the DaySpan appointment property. This property is not the number of full
days that the appointment covers. It is the number 12:00AM boundaries that the
|