Module SigCJPopupControlDemo.vw
1Use Windows.pkg
2Use DFClient.pkg
3Use cSigCJPopupControl.pkg
4
5Deferred_View Activate_oSigCJPopupControlDemo_View for ;
6Object oSigCJPopupControlDemo_View is a dbView
7
8 Set Border_Style to Border_Thick
9 Set Size to 200 300
10 Set Location to 11 5
11 Set Label to "Codejock Demo - Popup Control"
12 Set Icon to "SIG.ico"
13
14 Object oShowMessageBar_Bn is a Button
15 Set Location to 55 95
16 Set Size to 13 100
17 Set Label to "Show Message Bar"
18
19 Procedure OnClick
20 Send ShowMessageBar of ghoCommandBars "Hello World" "Educ 2010"
21 End_Procedure
22 End_Object
23
24 Object oPopupControl1_bn is a Button
25 Set Location to 100 95
26 Set Size to 13 100
27 Set Label to "Show Popup Control 1"
28
29 Procedure OnClick
30 Handle hoItem
31 // Must reset to get a clean start
32 Send Reset of oSigCJPopupControl1
33 // Add Images and Text Items to the popup control
34 Get Add_Image_Item of oSigCJPopupControl1 7 7 24 24 5001 to hoItem
35 Get Add_Text_Item of oSigCJPopupControl1 33 12 160 40 "You've got mail!" True to hoItem
36 // Set any font properties
37 Set pbBold of hoItem to True
38 Set pbItalic of hoItem to True
39 Set psFontName of hoItem to "Calibri"
40 Set pnFontSize of hoItem to 11
41 // Now tell it to popup
42 Send Popup of oSigCJPopupControl1
43 End_Procedure
44 End_Object
45
46 Object oPopupControl2_bn is a Button
47 Set Location to 120 95
48 Set Size to 13 100
49 Set Label to "Show Popup Control 2"
50
51 Procedure OnClick
52 Handle hoItem
53 // Must reset to get a clean start
54 Send Reset of oSigCJPopupControl1
55 // Add Images and Text Items to the popup control
56 Get Add_Image_Item of oSigCJPopupControl1 7 7 24 24 5002 to hoItem
57 Get Add_Text_Item of oSigCJPopupControl1 33 12 160 40 "You've got Calender Items!" True to hoItem
58 // Now tell it to popup
59 Send Popup of oSigCJPopupControl1
60 End_Procedure
61 End_Object
62
63 Object oSigCJPopupControl1 is a cSigCJPopupControl
64
65 #IF (SigCj_Codejock_Version < 150001)
66 Set pPopupControlTheme to OLExtpPopupThemeOffice2007
67 #ELSE
68 Set pPopupControlTheme to OLExtpPopupThemeResource
69 #ENDIF
70
71 Procedure Load_Images
72 Integer iImage
73
74 Get AddImage "icon1_24.bmp" 0 0 to iImage
75 Get AddImage "icon2_24.bmp" 0 0 to iImage
76 Get AddImage "icon3_24.bmp" 0 0 to iImage
77 End_Procedure
78
79 Procedure OnClick Integer iItem
80 Send Info_Box ("You Click item" * String(iItem))
81 End_Procedure //OnClick
82 End_Object
83
84Cd_End_Object
85