Datatable Samples · KcsDev1982/sunbelt-plb-samples@46ff524 · GitHub
Skip to content

Commit 46ff524

Browse files
committed
Datatable Samples
Samples for the DATATABLE object
1 parent 09f3e0f commit 46ff524

7 files changed

Lines changed: 483 additions & 0 deletions

File tree

.gitignore

Lines changed: 16 additions & 0 deletions

datatable/datatbl_card.pls

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
*---------------------------------------------------------------
2+
.
3+
. Program Name: datatbl_card
4+
. Description: Test DataTable Cards
5+
.
6+
. Revision History:
7+
.
8+
. 22-10-19 whk
9+
. Original code
10+
.
11+
INCLUDE plbequ.inc
12+
INCLUDE plbmeth.inc
13+
INCLUDE plbstdlib.inc
14+
15+
16+
*---------------------------------------------------------------
17+
MainForm PLFORM datatbl_cardf.pwf
18+
Cards DATATABLE
19+
20+
*................................................................
21+
.
22+
. Code start
23+
.
24+
CALL Main
25+
LOOP
26+
EVENTWAIT
27+
REPEAT
28+
STOP
29+
30+
*................................................................
31+
.
32+
. $ITEMACTIVATE Event
33+
.
34+
Do_Item LFUNCTION
35+
ENTRY
36+
EventResult FORM 10
37+
Item FORM 5
38+
SubItem FORM 5
39+
InfoLine DIM 80
40+
EVENTINFO 0,RESULT=EventResult
41+
CALC Item = ( EventResult / 100 )
42+
CALC SubItem = ( EventResult - ( Item * 100 ) )
43+
PACK InfoLine with "Card Activate: ",Item
44+
DataList1.InsertString Using InfoLine,0
45+
FUNCTIONEND
46+
*................................................................
47+
.
48+
. $UPDATED Event
49+
.
50+
Do_Update LFUNCTION
51+
ENTRY
52+
EventResult FORM 10
53+
Item FORM 5
54+
SubItem FORM 5
55+
InfoLine DIM 80
56+
EVENTINFO 0,RESULT=EventResult
57+
CALC Item = ( EventResult / 100 )
58+
CALC SubItem = ( EventResult - ( Item * 100 ) )
59+
PACK InfoLine with "Button Click: ",Item, " Col: ", Subitem
60+
DataList1.InsertString Using InfoLine,0
61+
FUNCTIONEND
62+
63+
*................................................................
64+
.
65+
. SetupCards
66+
.
67+
SetupCards LFUNCTION
68+
ENTRY
69+
70+
CREATE Cards
71+
72+
Cards.AddColumn Using 0, *ContentType=$TC_HEADER
73+
Cards.AddColumn Using 1, *ContentType=$TC_TITLE
74+
Cards.AddColumn Using 2, *ContentType=$TC_DETAILS
75+
Cards.AddColumn Using 3, *ContentType=$TC_BUTTON1
76+
Cards.AddColumn Using 4, *ContentType=$TC_FOOTER
77+
Cards.AddColumn Using 5
78+
79+
SETPROP Cards.columns(2), *ALIGNMENT=$CENTER
80+
81+
Cards.AddRow USING "Featured":
82+
*subitem1="Special title treatment":
83+
*subitem2="With support text below as a natural lead-in to additional content.":
84+
*subitem3="Go somewhere":
85+
*subitem4="1 day ago"
86+
87+
Cards.AddRow USING "Featured":
88+
*subitem1="Special title treatment":
89+
*subitem2="With supporting text below as a natural lead-in to additional content.":
90+
*subitem3="Go somewhere":
91+
*subitem4="2 days ago"
92+
93+
Cards.AddRow USING "Featured":
94+
*subitem1="Special title treatment":
95+
*subitem2="With supporting text below as a natural lead-in to additional content.":
96+
*subitem3="Go somewhere":
97+
*subitem4="2 days ago"
98+
99+
Cards.AddRow USING "Featured":
100+
*subitem1="Special title treatment":
101+
*subitem2="With supporting text below as a natural lead-in to additional content.":
102+
*subitem3="Go somewhere":
103+
*subitem4="3 days ago"
104+
105+
SETPROP Cards.rows(2),*context=3
106+
107+
EVENTREG Cards,$ITEMACTIVATE,Do_Item
108+
EVENTREG Cards,$UPDATED,Do_Update
109+
FUNCTIONEND
110+
111+
*................................................................
112+
.
113+
. Main - Main program entry point
114+
.
115+
Main LFUNCTION
116+
ENTRY
117+
118+
WINHIDE
119+
120+
FORMLOAD MainForm
121+
CALL SetupCards
122+
Cards.HtmlBind Using HtmlTable, $HTML_STYLE_CARD
123+
124+
125+
FUNCTIONEND

datatable/datatbl_cardf.pwf

6.64 KB
Binary file not shown.

datatable/datatbl_lv.pls

Lines changed: 223 additions & 0 deletions

datatable/datatbl_lvf.pwf

6.64 KB
Binary file not shown.

0 commit comments

Comments
 (0)