home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1993 #2 / Image.iso / database / pk4pak.zip / CALENDAR.DOC < prev    next >
Text File  |  1992-09-18  |  5KB  |  144 lines

  1. CALENDAR
  2.  
  3. A basic Calendar. By Henrik Bechmann of Elect Software International Inc., Toronto
  4.  
  5. =============================================================================
  6.                            CALENDAR DESCRIPTION
  7. =============================================================================
  8.  
  9. This is a basic calendar that presents one month at a time in a standard Paradox 4.0 dialog box. The user can use [Pgup/PgDn] to change months, [CtrlPgUp/CtrlPgDn] to change years, or select the [Month] pushbutton for a Month sub-dialog box or a Year sub-dialog box by pushing the [Year] button on the main calendar. The Year sub-dialog box allows the user to change years with the [PgUp/PgDn] keys, or by typing in the new year.
  10.  
  11. The Calendar allows the user to select a day of the month, from 100 A.D. to 9999 A.D. If the user selects a date from the calendar, then the Calendar.Dialog() returns true, otherwise it returns false. If Calendar.Dialog returns true, then the selected date can be picked up from the property Calendar.Date. To override the default date (today()) set the property Calendar.Date before calling Calendar.Dialog().
  12.  
  13. =============================================================================
  14.                            CALENDAR USAGE
  15. =============================================================================
  16.  
  17. The simplest way to use the Calendar is to 
  18.  
  19.         Play "Calendar"
  20.  
  21. The default bahavior will place a selected date in a date field or in a memo if the workspace is in "Edit" or "CoEdit" mode.
  22.  
  23. Alternatively, you can load procedures from the Calendar.sc script at the beginning of your application like this:
  24.  
  25.         Librarian.HasControl = True
  26.         Play "Calendar"
  27.         Release Vars Librarian.HasControl
  28.  
  29. You can then call Calendar.Constructor() , Calendar.Dialog(), and Calendar.Constructor() according to the documentation below. Or you can just call Calendar.Show() to get the default behavior described in the first option.
  30.  
  31. As a third alternative, you can write all the procedures in Calendar.sc to a library, and handle them accordingly.
  32.  
  33. =============================================================================
  34.                            CALENDAR INTERFACE
  35. =============================================================================
  36. Methods:
  37. --------
  38.  
  39. Calendar.Constructor()
  40.  
  41. Syntax: Calendar.Constructor()
  42.  
  43. Returns: Nothing.
  44.  
  45. Description: Creates the calendar in memory.
  46.  
  47. Usage: Issue Calendar.Constructor() at the beginning of the session with Calendar, or at the beginning of your application. If Calendar.Constructor() is called once at the beginning of your application, then each time the user views the Calendar, he or she will see the date that was selected the last time the Calendar was used.
  48.  
  49. ------
  50. Calendar.Destructor()
  51.  
  52. Syntax: Calendar.Destructor()
  53.  
  54. Returns: Nothing.
  55.  
  56. Description: Destroys Calendar in memory.
  57.  
  58. Usage: Call Calendar.Destructor() at the end of the Calendar session if Calendar.Constructor() was called at the beginning of the Calendar session, or call Calendar.Destructor() at the end of your application if Calendar.Constuctor() was called at the beginning of your application.
  59.  
  60. ------
  61. Calendar.Dialog()
  62.  
  63. Syntax: Calendar.Dialog()
  64.  
  65. Returns: True if the user selected a date, otherwise returns false. If it returns true, then as a side effect Calendar.Date is set to the date the user selected.
  66.  
  67. Description: Displays the Calendar and waits for user input.
  68.  
  69. Usage: Issue Calendar.Dialog() when you want to display the calendar to the user, after issuing Calendar.Constructor() and before issuing Calendar.Destructor().
  70.  
  71. Example:
  72.         Calendar.Constructor()    ; create the Calendar
  73.         If Calendar.Dialog() Then ; user has selected a date
  74.            [] = Calendar.Date     ; place date in date field
  75.         Endif
  76.         Calendar.Destructor()     ; destroy the Calendar
  77.  
  78.  
  79. Properties: 
  80. -----------
  81.  
  82. Alter properties after Calendar.Constructor() call and before Calendar.Dialog() call.
  83.  
  84. ------
  85. Calendar.Date
  86.  
  87. Data type: Date
  88.  
  89. Description: The date. Overrides default if set before Calendar.Dialog(), and contains the selected date if Calendar.Dialog() returns true.
  90.  
  91. ------
  92. Calendar.DisplayTime
  93.  
  94. Data type: Logical
  95.  
  96. Description: If true, displays time (with annoying cursor flicker if the cursor is on the PickArray) otherwise doesn't display time.
  97.  
  98. ------
  99. Calendar.ColorBag[]
  100.  
  101. Data type: Dynarray
  102.  
  103. Description: assign colors by Window SetColors convention
  104.  
  105. ------
  106. Calendar.FrameShadow
  107.  
  108. Data type: Numeric, color attribute
  109.  
  110. Description: The color for the dark sides of the raised frames
  111.  
  112. ------
  113. Calendar.FrameHighlight
  114.  
  115. Data type: Numeric, color attribute
  116.  
  117. Description: The color for the light sides of the raised frames
  118.  
  119. ------
  120. Calendar.WindowBag[]
  121.  
  122. Data type: Dunarray
  123.  
  124. Description: assign attributes by Window SetAttributes convention
  125.  
  126. -------
  127. Analagous properties for the sub-dialogs...
  128.  
  129. Calendar.YearColorBag[]
  130. Calendar.YearFrameShadow
  131. Calendar.YearFrameHighlight
  132. Calendar.YearWindowBag[]
  133. Calendar.MonthColorBag[]
  134. Calendar.MonthFrameShadow
  135. Calendar.MonthFrameHighlight
  136. Calendar.MonthWindowBag[]
  137.  
  138. ------
  139. Calendar.IsActive
  140.  
  141. Data type: Logical
  142.  
  143. Description: (readonly) indicates if Calendar.Constructor() has been run. Use IsAssigned(Calendar.IsActive) to test existence of the Calendar.
  144.