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

Gravitybox Schedule Primer
Page 159 
1998-2004 Gravitybox Software LLC
  End If
  
  If Value.Priority = pcLow Then cboPriority.ListIndex = 0
  If Value.Priority = pcNormal Then cboPriority.ListIndex = 1
  If Value.Priority = pcHigh Then cboPriority.ListIndex = 2
  
  VScroll.Value = VScroll.Max
  VScroll.Value = VScroll.Min
  VScroll.Value = 100 - Value.PercentComplete
  txtCategories.Text = Value.Category
  chkReminder.Value = IIf(Value.Reminder, vbChecked, _
                                          vbUnchecked)
  txtNotes.Text = Value.Notes
    
End Property
This means that to call the form all we need to do from the parent is load the form and
set its Task object
Load frmTaskProperties
Set frmTaskProperties.Task = Tasks(oTask.Index)
FrmTaskProperties.Show vbModal
Now the form will loaded, it will load all of its own child controls and then it will be shown
as a modal form. We put this code in the “TaskDblClick” event of the TaskList. When
the user double-clicks on a task, this code is executed.
Calendar
Now it is time for the crowning jewel of the entire example. This application is used to
show off the schedule, so let start to build something with the schedule on it. The
calendar functionality of the GbOrganize example illustrates how to build a nice, simple
schedule. For this, we will need the same thing the other parts of this application require
a main form and a property box. 
The main form is an MDI child form with a schedule placed on it. It will be capable of
displaying in four different modes: day, work week, week, and month. In day mode the
schedule will display one day only. There will be one column (the day) and the times will
be displayed on the left. Its MinDate and MaxDate will be the same. In work week
mode, the schedule will display one week Monday to Friday. There will be no
weekends. In week mode, the schedule will display Sunday through Saturday of a
particular week. Finally in month mode there will be an entire month visible at one time.
All displays are controlled by a calendar on the right side of the screen.
The MonthView control on the right side of the screen defines the current date. In day
mode this is the date that is displayed. In any other mode this date is belongs to the
http://www.purepage.com