Module Calendar_Special_Dates.vw
1Use Windows.pkg
2Use DFClient.pkg
3Use Cal_Date.DD
4Use dfTable.pkg
5Use Colr_dlg.pkg
6
7//Use cSigCJdbForm.pkg
8
9Deferred_View Activate_oSigCJCalendarDemo_Special_Dates_View for ;
10Object oSigCJCalendarDemo_Special_Dates_View is a dbView
11 Set Border_Style to Border_Thick
12 Set Size to 200 460
13 Set Location to 2 2
14 Set Label to "Codejcok Demo - Calendar Special Dates"
15 Set piMinSize to 200 460
16 Set Maximize_Icon to True
17 Set Icon to "SIG.ico"
18
19 Object oCal_Date_DD is a Cal_Date_DataDictionary
20 End_Object
21
22 Set Main_DD to oCal_Date_DD
23 Set Server to oCal_Date_DD
24
25
26 Object oColorDialog is a ColorDialog
27
28 Function SelectColor Returns Integer
29 Integer iRgbColor bColorSelected
30
31 Get Show_Dialog to bColorSelected
32 If (bColorSelected = True) Begin
33 Get SelectedColor to iRgbColor
34 End
35
36 Function_Return iRgbColor
37 End_Function // SelectColor
38
39 End_Object // oColorDialog
40
41 Object oDbGrid1 is a dbGrid
42 Set Size to 192 452
43 Set Location to 4 4
44
45 Begin_Row
46 Entry_Item cal_date.Date_From
47 Entry_Item cal_date.Date_To
48 Entry_Item cal_date.Title
49 Entry_Item cal_date.BackColour
50 Entry_Item cal_date.AllDay
51 Entry_Item cal_date.AllowEvents
52 End_Row
53
54 Set Main_File to cal_date.File_number
55
56 Set Form_Width 0 to 60
57 Set Header_Label 0 to "Date From"
58 Set Form_Button 0 to Form_Button_Prompt
59 Set Form_Button_Bitmap 0 to "CalendarPrompt.Bmp"
60 Set Form_Width 1 to 60
61 Set Header_Label 1 to "Date To"
62 Set Form_Button 1 to Form_Button_Prompt
63 Set Form_Button_Bitmap 1 to "CalendarPrompt.Bmp"
64 Set Form_Width 2 to 160
65 Set Header_Label 2 to "Title"
66 Set Form_Width 3 to 48
67 Set Header_Label 3 to "BackColor"
68 Set Column_Button 3 to Form_Button_Prompt
69 Set Form_Width 4 to 60
70 Set Header_Label 4 to "All Day"
71 Set Column_Checkbox_State 4 to True
72 Set Form_Width 5 to 60
73 Set Header_Label 5 to "Allow Events"
74 Set Column_Combo_State 5 to True
75 Set pbEmbeddedPrompts to True
76 Set pbReverseOrdering to True
77 Set peAnchors to anAll
78 Set Ordering to 1
79
80 Procedure Activating Returns Integer
81 Integer iRetval
82 Forward Get msg_Activating to iRetval
83 Send Beginning_of_Data
84 Procedure_Return iRetval
85 End_Procedure
86
87// Procedure Prompt
88// Integer iRBG
89// Get SelectColor of oColorDialog to iRBG
90// Set Field_Changed_Value of oCal_Date_DD Field cal_date.BackColor to iRBG
91// End_Procedure // Prompt
92
93 Procedure Prompt
94 Integer iBase_Item iCurrent_Item
95 Integer iRBG
96
97 Forward Send Prompt
98
99 Get Base_Item to iBase_Item
100 Get Current_Item to iCurrent_Item
101
102 If (iBase_Item+3) eq iCurrent_Item Begin
103 // Send Info_Box "Hello Color prompt"
104 Get SelectColor of oColorDialog to iRBG
105 Set Field_Changed_Value of oCal_Date_DD Field cal_date.BackColour to iRBG
106 End
107 End_Procedure // Prompt
108
109 End_Object
110
111Cd_End_Object
112