-
Notifications
You must be signed in to change notification settings - Fork 24
/
wSettingsTab2.w
1017 lines (797 loc) · 32.1 KB
/
wSettingsTab2.w
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
&ANALYZE-SUSPEND _VERSION-NUMBER AB_v10r12 GUI
&ANALYZE-RESUME
&Scoped-define WINDOW-NAME C-Win
&ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _DEFINITIONS C-Win
/*------------------------------------------------------------------------
Name: wSettingsTab2.w
Desc: Settings tab for Appearance
----------------------------------------------------------------------*/
/* This .W file was created with the Progress AppBuilder. */
/*----------------------------------------------------------------------*/
CREATE WIDGET-POOL.
DEFINE INPUT PARAMETER phParent AS HANDLE NO-UNDO.
DEFINE INPUT PARAMETER phRectangle AS HANDLE NO-UNDO.
/* Local Variable Definitions --- */
{ DataDigger.i }
/* _UIB-CODE-BLOCK-END */
&ANALYZE-RESUME
&ANALYZE-SUSPEND _UIB-PREPROCESSOR-BLOCK
/* ******************** Preprocessor Definitions ******************** */
&Scoped-define PROCEDURE-TYPE Window
&Scoped-define DB-AWARE no
/* Name of designated FRAME-NAME and/or first browse and/or first query */
&Scoped-define FRAME-NAME DEFAULT-FRAME
/* Custom List Definitions */
/* List-1,List-2,List-3,List-4,List-5,List-6 */
/* _UIB-PREPROCESSOR-BLOCK-END */
&ANALYZE-RESUME
/* *********************** Control Definitions ********************** */
/* Define the widget handle for the window */
DEFINE VAR C-Win AS WIDGET-HANDLE NO-UNDO.
/* Definitions of the field level widgets */
DEFINE VARIABLE rsTitleBarDbName AS CHARACTER
VIEW-AS RADIO-SET VERTICAL
RADIO-BUTTONS
"No Name", "none",
"Logical Name", "ldbname",
"Physical Name", "pdbname"
SIZE-PIXELS 155 BY 55 TOOLTIP "which database name to use in title bar" NO-UNDO.
DEFINE RECTANGLE RECT-22
EDGE-PIXELS 2 GRAPHIC-EDGE NO-FILL
SIZE-PIXELS 400 BY 114.
DEFINE VARIABLE tgTitleStartsWithTableName AS LOGICAL INITIAL no
LABEL "Start Title With Table Name"
VIEW-AS TOGGLE-BOX
SIZE-PIXELS 275 BY 17 TOOLTIP "use table name as first element in the title" NO-UNDO.
DEFINE BUTTON btnDefaultFont
LABEL "&Default Font"
SIZE-PIXELS 150 BY 24.
DEFINE BUTTON btnFixedFont
LABEL "&Fixed Font"
SIZE-PIXELS 150 BY 24.
DEFINE RECTANGLE RECT-20
EDGE-PIXELS 2 GRAPHIC-EDGE NO-FILL
SIZE-PIXELS 400 BY 70.
DEFINE VARIABLE tgAutoFont AS LOGICAL INITIAL no
LABEL "&Automatically set fonts"
VIEW-AS TOGGLE-BOX
SIZE-PIXELS 215 BY 17 NO-UNDO.
DEFINE BUTTON btnFavouriteTable
LABEL "Set"
SIZE-PIXELS 50 BY 21.
DEFINE BUTTON btnfiCustomFormat
LABEL "Set"
SIZE-PIXELS 50 BY 21.
DEFINE BUTTON btnfiCustomOrder
LABEL "Set"
SIZE-PIXELS 50 BY 21.
DEFINE BUTTON btnFieldFilter
LABEL "Set"
SIZE-PIXELS 50 BY 21.
DEFINE BUTTON btnIndexInactive
LABEL "Set"
SIZE-PIXELS 50 BY 21.
DEFINE BUTTON btnPrimIndex
LABEL "Set"
SIZE-PIXELS 50 BY 21.
DEFINE BUTTON btnWarningBox
LABEL "Set"
SIZE-PIXELS 50 BY 21.
DEFINE VARIABLE fiCustomFormat AS CHARACTER FORMAT "X(256)":U INITIAL "CustomFormat"
LABEL "User-defined format"
VIEW-AS FILL-IN NATIVE
SIZE-PIXELS 170 BY 21 NO-UNDO.
DEFINE VARIABLE fiCustomOrder AS CHARACTER FORMAT "X(256)":U INITIAL "CustomOrder"
LABEL "User-defined order"
VIEW-AS FILL-IN NATIVE
SIZE-PIXELS 170 BY 21 NO-UNDO.
DEFINE VARIABLE fiFavouriteTable AS CHARACTER FORMAT "X(256)":U INITIAL "Favourite Table"
LABEL "Favourite Table"
VIEW-AS FILL-IN NATIVE
SIZE-PIXELS 170 BY 21 NO-UNDO.
DEFINE VARIABLE fiFieldFilter AS CHARACTER FORMAT "X(256)":U INITIAL "Matched by Field Filter"
LABEL "Table matches Field Filter"
VIEW-AS FILL-IN NATIVE
SIZE-PIXELS 170 BY 21 NO-UNDO.
DEFINE VARIABLE fiIndexInactive AS CHARACTER FORMAT "X(256)":U INITIAL "IndexInactive"
LABEL "Inactive Index"
VIEW-AS FILL-IN NATIVE
SIZE-PIXELS 170 BY 21 NO-UNDO.
DEFINE VARIABLE fiPrimIndex AS CHARACTER FORMAT "X(256)":U INITIAL "PrimIndex"
LABEL "Primary Index"
VIEW-AS FILL-IN NATIVE
SIZE-PIXELS 170 BY 21 NO-UNDO.
DEFINE VARIABLE fiWarningBox AS CHARACTER FORMAT "X(256)":U INITIAL "WarningBox"
LABEL "Changed format"
VIEW-AS FILL-IN NATIVE
SIZE-PIXELS 170 BY 21 NO-UNDO.
DEFINE RECTANGLE RECT-14
EDGE-PIXELS 2 GRAPHIC-EDGE NO-FILL
SIZE-PIXELS 400 BY 224.
DEFINE VARIABLE tgHighlightFavouriteTables AS LOGICAL INITIAL yes
LABEL "Highlight Favourite tables"
VIEW-AS TOGGLE-BOX
SIZE-PIXELS 180 BY 17 NO-UNDO.
DEFINE BUTTON btnEven
LABEL "Set"
SIZE-PIXELS 50 BY 21.
DEFINE BUTTON btnFilterBox
LABEL "Set"
SIZE-PIXELS 50 BY 21.
DEFINE BUTTON btnOdd
LABEL "Set"
SIZE-PIXELS 50 BY 21.
DEFINE BUTTON btnQueryError
LABEL "Set"
SIZE-PIXELS 50 BY 21.
DEFINE BUTTON btnRecordCountComplete
LABEL "Set"
SIZE-PIXELS 50 BY 21.
DEFINE BUTTON btnRecordCountIncomplete
LABEL "Set"
SIZE-PIXELS 50 BY 21.
DEFINE BUTTON btnRecordCountSelected
LABEL "Set"
SIZE-PIXELS 50 BY 21.
DEFINE VARIABLE fiEvenRow AS CHARACTER FORMAT "X(256)":U INITIAL "Data Row: even"
LABEL "Even rows"
VIEW-AS FILL-IN NATIVE
SIZE-PIXELS 170 BY 21 NO-UNDO.
DEFINE VARIABLE fiFilterBox AS CHARACTER FORMAT "X(256)":U INITIAL "FilterBox"
LABEL "Box color when filter used"
VIEW-AS FILL-IN NATIVE
SIZE-PIXELS 170 BY 21 NO-UNDO.
DEFINE VARIABLE fiOddRow AS CHARACTER FORMAT "X(256)":U INITIAL "Data Row: odd"
LABEL "Odd rows"
VIEW-AS FILL-IN NATIVE
SIZE-PIXELS 170 BY 21 NO-UNDO.
DEFINE VARIABLE fiQueryError AS CHARACTER FORMAT "X(256)":U INITIAL "QueryError"
LABEL "Error on opening query"
VIEW-AS FILL-IN NATIVE
SIZE-PIXELS 170 BY 21 NO-UNDO.
DEFINE VARIABLE fiRecordCountComplete AS CHARACTER FORMAT "X(256)":U INITIAL "RecordCount:Complete"
LABEL "All records fetched"
VIEW-AS FILL-IN NATIVE
SIZE-PIXELS 170 BY 21 NO-UNDO.
DEFINE VARIABLE fiRecordCountIncomplete AS CHARACTER FORMAT "X(256)":U INITIAL "RecordCount:Incomplete"
LABEL "Not all records fetched"
VIEW-AS FILL-IN NATIVE
SIZE-PIXELS 170 BY 21 NO-UNDO.
DEFINE VARIABLE fiRecordCountSelected AS CHARACTER FORMAT "X(256)":U INITIAL "RecordCount:Selected"
LABEL "Nr of selected records"
VIEW-AS FILL-IN NATIVE
SIZE-PIXELS 170 BY 21 NO-UNDO.
DEFINE RECTANGLE RECT-17
EDGE-PIXELS 2 GRAPHIC-EDGE NO-FILL
SIZE-PIXELS 400 BY 224.
DEFINE VARIABLE tgUseSystemColors AS LOGICAL INITIAL no
LABEL "Use &System Colors"
VIEW-AS TOGGLE-BOX
SIZE-PIXELS 150 BY 17 NO-UNDO.
DEFINE VARIABLE fiExample AS CHARACTER FORMAT "X(256)":U
LABEL "Example"
VIEW-AS FILL-IN
SIZE-PIXELS 170 BY 21 NO-UNDO.
DEFINE VARIABLE rsColumnLabelTemplate AS CHARACTER
VIEW-AS RADIO-SET VERTICAL
RADIO-BUTTONS
"Field name", "&1",
"Order + Field name", "&2. &1",
"Label", "&3",
"Order + Label", "&2. &3"
SIZE-PIXELS 175 BY 75 TOOLTIP "template for column labels on the data browse" NO-UNDO.
DEFINE RECTANGLE RECT-19
EDGE-PIXELS 2 GRAPHIC-EDGE NO-FILL
SIZE-PIXELS 400 BY 138.
/* ************************ Frame Definitions *********************** */
DEFINE FRAME DEFAULT-FRAME
WITH 1 DOWN NO-BOX KEEP-TAB-ORDER OVERLAY
SIDE-LABELS NO-UNDERLINE THREE-D
AT COL 1 ROW 1
SIZE 184 BY 31.38 .
DEFINE FRAME FRAME-Z
rsColumnLabelTemplate AT Y 30 X 85 NO-LABEL
fiExample AT Y 111 X 75 COLON-ALIGNED
"Data Browse Column Label Template" VIEW-AS TEXT
SIZE-PIXELS 240 BY 17 AT Y 2 X 15
RECT-19 AT Y 11 X 5
WITH 1 DOWN KEEP-TAB-ORDER OVERLAY
SIDE-LABELS NO-UNDERLINE THREE-D
AT X 10 Y 155
SIZE-PIXELS 415 BY 170
TITLE "2" .
DEFINE FRAME FRAME-V
tgUseSystemColors AT Y 25 X 170
fiOddRow AT Y 45 X 160 COLON-ALIGNED NO-TAB-STOP
btnOdd AT Y 45 X 344
fiEvenRow AT Y 68 X 160 COLON-ALIGNED NO-TAB-STOP
btnEven AT Y 68 X 344
fiFilterBox AT Y 102 X 160 COLON-ALIGNED NO-TAB-STOP
btnFilterBox AT Y 102 X 344
fiQueryError AT Y 127 X 160 COLON-ALIGNED NO-TAB-STOP
btnQueryError AT Y 127 X 344
fiRecordCountComplete AT Y 152 X 160 COLON-ALIGNED NO-TAB-STOP
btnRecordCountComplete AT Y 152 X 344
fiRecordCountIncomplete AT Y 178 X 160 COLON-ALIGNED NO-TAB-STOP
btnRecordCountIncomplete AT Y 178 X 344
fiRecordCountSelected AT Y 204 X 160 COLON-ALIGNED NO-TAB-STOP
btnRecordCountSelected AT Y 204 X 344
"Data / query highlighting colors" VIEW-AS TEXT
SIZE-PIXELS 225 BY 17 AT Y 2 X 15
RECT-17 AT Y 11 X 5
WITH 1 DOWN KEEP-TAB-ORDER OVERLAY
SIDE-LABELS NO-UNDERLINE THREE-D
AT X 10 Y 340
SIZE-PIXELS 415 BY 265
TITLE "2" .
DEFINE FRAME FRAME-T
tgHighlightFavouriteTables AT Y 20 X 170
fiFavouriteTable AT Y 39 X 160 COLON-ALIGNED NO-TAB-STOP
btnFavouriteTable AT Y 39 X 344
fiFieldFilter AT Y 74 X 160 COLON-ALIGNED NO-TAB-STOP
btnFieldFilter AT Y 74 X 344
fiCustomOrder AT Y 100 X 160 COLON-ALIGNED NO-TAB-STOP
btnfiCustomOrder AT Y 100 X 344
fiCustomFormat AT Y 126 X 160 COLON-ALIGNED NO-TAB-STOP
btnfiCustomFormat AT Y 126 X 344
fiWarningBox AT Y 152 X 160 COLON-ALIGNED NO-TAB-STOP
btnWarningBox AT Y 152 X 344
fiIndexInactive AT Y 179 X 160 COLON-ALIGNED NO-TAB-STOP
btnIndexInactive AT Y 179 X 344
fiPrimIndex AT Y 205 X 160 COLON-ALIGNED NO-TAB-STOP
btnPrimIndex AT Y 205 X 344
"Schema highlighting colors" VIEW-AS TEXT
SIZE-PIXELS 175 BY 17 AT Y 2 X 15
RECT-14 AT Y 11 X 5
WITH 1 DOWN KEEP-TAB-ORDER OVERLAY
SIDE-LABELS NO-UNDERLINE THREE-D
AT X 465 Y 205
SIZE-PIXELS 415 BY 275
TITLE "2" .
DEFINE FRAME FRAME-J
tgAutoFont AT Y 25 X 88
btnDefaultFont AT Y 46 X 88
btnFixedFont AT Y 46 X 245
"Fonts" VIEW-AS TEXT
SIZE-PIXELS 55 BY 17 AT Y 2 X 15
"Set fonts:" VIEW-AS TEXT
SIZE-PIXELS 73 BY 13 AT Y 51 X 10
RECT-20 AT Y 11 X 5
WITH 1 DOWN KEEP-TAB-ORDER OVERLAY
SIDE-LABELS NO-UNDERLINE THREE-D
AT X 10 Y 15
SIZE-PIXELS 415 BY 115
TITLE "2" .
DEFINE FRAME FRAME-AB
rsTitleBarDbName AT Y 28 X 85 NO-LABEL
tgTitleStartsWithTableName AT Y 95 X 85
"Database Name in Title Bar" VIEW-AS TEXT
SIZE-PIXELS 180 BY 17 AT Y 2 X 15
RECT-22 AT Y 11 X 5
WITH 1 DOWN KEEP-TAB-ORDER OVERLAY
SIDE-LABELS NO-UNDERLINE THREE-D
AT X 465 Y 40
SIZE-PIXELS 415 BY 150
TITLE "2" .
/* *********************** Procedure Settings ************************ */
&ANALYZE-SUSPEND _PROCEDURE-SETTINGS
/* Settings for THIS-PROCEDURE
Type: Window
Allow: Basic,Browse,DB-Fields,Window,Query
Other Settings: COMPILE
*/
&ANALYZE-RESUME _END-PROCEDURE-SETTINGS
/* ************************* Create Window ************************** */
&ANALYZE-SUSPEND _CREATE-WINDOW
IF SESSION:DISPLAY-TYPE = "GUI":U THEN
CREATE WINDOW C-Win ASSIGN
HIDDEN = YES
TITLE = "<insert window title>"
HEIGHT = 31.71
WIDTH = 185.8
MAX-HEIGHT = 40.52
MAX-WIDTH = 235.6
VIRTUAL-HEIGHT = 40.52
VIRTUAL-WIDTH = 235.6
RESIZE = yes
SCROLL-BARS = no
STATUS-AREA = no
BGCOLOR = ?
FGCOLOR = ?
KEEP-FRAME-Z-ORDER = yes
THREE-D = yes
MESSAGE-AREA = no
SENSITIVE = yes.
ELSE {&WINDOW-NAME} = CURRENT-WINDOW.
/* END WINDOW DEFINITION */
&ANALYZE-RESUME
/* *********** Runtime Attributes and AppBuilder Settings *********** */
&ANALYZE-SUSPEND _RUN-TIME-ATTRIBUTES
/* SETTINGS FOR WINDOW C-Win
NOT-VISIBLE,,RUN-PERSISTENT */
/* REPARENT FRAME */
ASSIGN FRAME FRAME-AB:FRAME = FRAME DEFAULT-FRAME:HANDLE
FRAME FRAME-J:FRAME = FRAME DEFAULT-FRAME:HANDLE
FRAME FRAME-T:FRAME = FRAME DEFAULT-FRAME:HANDLE
FRAME FRAME-V:FRAME = FRAME DEFAULT-FRAME:HANDLE
FRAME FRAME-Z:FRAME = FRAME DEFAULT-FRAME:HANDLE.
/* SETTINGS FOR FRAME DEFAULT-FRAME
FRAME-NAME */
DEFINE VARIABLE XXTABVALXX AS LOGICAL NO-UNDO.
ASSIGN XXTABVALXX = FRAME FRAME-T:MOVE-BEFORE-TAB-ITEM (FRAME FRAME-V:HANDLE)
XXTABVALXX = FRAME FRAME-Z:MOVE-BEFORE-TAB-ITEM (FRAME FRAME-T:HANDLE)
XXTABVALXX = FRAME FRAME-AB:MOVE-BEFORE-TAB-ITEM (FRAME FRAME-Z:HANDLE)
XXTABVALXX = FRAME FRAME-J:MOVE-BEFORE-TAB-ITEM (FRAME FRAME-AB:HANDLE)
/* END-ASSIGN-TABS */.
ASSIGN
FRAME DEFAULT-FRAME:HIDDEN = TRUE.
/* SETTINGS FOR FRAME FRAME-AB
NOT-VISIBLE */
ASSIGN
FRAME FRAME-AB:HIDDEN = TRUE.
ASSIGN
rsTitleBarDbName:PRIVATE-DATA IN FRAME FRAME-AB =
"DataDigger,TitleBarDbName".
ASSIGN
tgTitleStartsWithTableName:PRIVATE-DATA IN FRAME FRAME-AB =
"DataDigger,TitleStartsWithTableName".
/* SETTINGS FOR FRAME FRAME-J
NOT-VISIBLE */
ASSIGN
FRAME FRAME-J:HIDDEN = TRUE.
ASSIGN
btnDefaultFont:PRIVATE-DATA IN FRAME FRAME-J =
"DataDigger:Fonts,default".
ASSIGN
btnFixedFont:PRIVATE-DATA IN FRAME FRAME-J =
"DataDigger:Fonts,fixed".
ASSIGN
tgAutoFont:PRIVATE-DATA IN FRAME FRAME-J =
"DataDigger:Fonts,AutoSetFont".
/* SETTINGS FOR FRAME FRAME-T
NOT-VISIBLE */
ASSIGN
FRAME FRAME-T:HIDDEN = TRUE.
ASSIGN
fiCustomFormat:READ-ONLY IN FRAME FRAME-T = TRUE
fiCustomFormat:PRIVATE-DATA IN FRAME FRAME-T =
"DataDigger:Colors,CustomFormat".
ASSIGN
fiCustomOrder:READ-ONLY IN FRAME FRAME-T = TRUE
fiCustomOrder:PRIVATE-DATA IN FRAME FRAME-T =
"DataDigger:Colors,CustomOrder".
ASSIGN
fiFavouriteTable:READ-ONLY IN FRAME FRAME-T = TRUE
fiFavouriteTable:PRIVATE-DATA IN FRAME FRAME-T =
"DataDigger:Colors,FavouriteTable".
ASSIGN
fiFieldFilter:READ-ONLY IN FRAME FRAME-T = TRUE
fiFieldFilter:PRIVATE-DATA IN FRAME FRAME-T =
"DataDigger:Colors,FieldFilter".
ASSIGN
fiIndexInactive:READ-ONLY IN FRAME FRAME-T = TRUE
fiIndexInactive:PRIVATE-DATA IN FRAME FRAME-T =
"DataDigger:Colors,IndexInactive".
ASSIGN
fiPrimIndex:READ-ONLY IN FRAME FRAME-T = TRUE
fiPrimIndex:PRIVATE-DATA IN FRAME FRAME-T =
"DataDigger:Colors,PrimIndex".
ASSIGN
fiWarningBox:READ-ONLY IN FRAME FRAME-T = TRUE
fiWarningBox:PRIVATE-DATA IN FRAME FRAME-T =
"DataDigger:Colors,WarningBox".
ASSIGN
tgHighlightFavouriteTables:PRIVATE-DATA IN FRAME FRAME-T =
"DataDigger:Colors,FavouriteTable:HiLite".
/* SETTINGS FOR FRAME FRAME-V
NOT-VISIBLE */
ASSIGN
FRAME FRAME-V:HIDDEN = TRUE.
ASSIGN
fiEvenRow:READ-ONLY IN FRAME FRAME-V = TRUE
fiEvenRow:PRIVATE-DATA IN FRAME FRAME-V =
"DataDigger:Colors,DataRow:even".
ASSIGN
fiFilterBox:READ-ONLY IN FRAME FRAME-V = TRUE
fiFilterBox:PRIVATE-DATA IN FRAME FRAME-V =
"DataDigger:Colors,FilterBox".
ASSIGN
fiOddRow:READ-ONLY IN FRAME FRAME-V = TRUE
fiOddRow:PRIVATE-DATA IN FRAME FRAME-V =
"DataDigger:Colors,DataRow:odd".
ASSIGN
fiQueryError:READ-ONLY IN FRAME FRAME-V = TRUE
fiQueryError:PRIVATE-DATA IN FRAME FRAME-V =
"DataDigger:Colors,QueryError".
ASSIGN
fiRecordCountComplete:READ-ONLY IN FRAME FRAME-V = TRUE
fiRecordCountComplete:PRIVATE-DATA IN FRAME FRAME-V =
"DataDigger:Colors,RecordCount:Complete".
ASSIGN
fiRecordCountIncomplete:READ-ONLY IN FRAME FRAME-V = TRUE
fiRecordCountIncomplete:PRIVATE-DATA IN FRAME FRAME-V =
"DataDigger:Colors,RecordCount:Incomplete".
ASSIGN
fiRecordCountSelected:READ-ONLY IN FRAME FRAME-V = TRUE
fiRecordCountSelected:PRIVATE-DATA IN FRAME FRAME-V =
"DataDigger:Colors,RecordCount:Selected".
ASSIGN
tgUseSystemColors:PRIVATE-DATA IN FRAME FRAME-V =
"DataDigger:Colors,DataRow:UseSystem".
/* SETTINGS FOR FRAME FRAME-Z
NOT-VISIBLE */
ASSIGN
FRAME FRAME-Z:HIDDEN = TRUE.
ASSIGN
fiExample:READ-ONLY IN FRAME FRAME-Z = TRUE.
ASSIGN
rsColumnLabelTemplate:PRIVATE-DATA IN FRAME FRAME-Z =
"DataDigger,ColumnLabelTemplate".
IF SESSION:DISPLAY-TYPE = "GUI":U AND VALID-HANDLE(C-Win)
THEN C-Win:HIDDEN = yes.
/* _RUN-TIME-ATTRIBUTES-END */
&ANALYZE-RESUME
/* ************************ Control Triggers ************************ */
&Scoped-define SELF-NAME C-Win
&ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL C-Win C-Win
ON END-ERROR OF C-Win /* <insert window title> */
OR ENDKEY OF {&WINDOW-NAME} ANYWHERE DO:
/* This case occurs when the user presses the "Esc" key.
In a persistently run window, just ignore this. If we did not, the
application would exit. */
IF THIS-PROCEDURE:PERSISTENT THEN RETURN NO-APPLY.
END.
/* _UIB-CODE-BLOCK-END */
&ANALYZE-RESUME
&ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL C-Win C-Win
ON WINDOW-CLOSE OF C-Win /* <insert window title> */
DO:
/* This event will close the window and terminate the procedure. */
APPLY "CLOSE":U TO THIS-PROCEDURE.
RETURN NO-APPLY.
END.
/* _UIB-CODE-BLOCK-END */
&ANALYZE-RESUME
&Scoped-define FRAME-NAME FRAME-J
&Scoped-define SELF-NAME btnDefaultFont
&ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL btnDefaultFont C-Win
ON CHOOSE OF btnDefaultFont IN FRAME FRAME-J /* Default Font */
DO:
DEFINE VARIABLE iFontNr AS INTEGER NO-UNDO.
DEFINE VARIABLE lOk AS LOGICAL NO-UNDO.
iFontNr = INTEGER(getRegistry('DataDigger:Fonts', 'Default')).
RUN adecomm/_chsfont.p
( INPUT "Choose your default font"
, INPUT iFontNr
, INPUT-OUTPUT iFontNr
, OUTPUT lOk
).
IF lOk THEN SELF:FONT = iFontNr.
END.
/* _UIB-CODE-BLOCK-END */
&ANALYZE-RESUME
&Scoped-define FRAME-NAME FRAME-V
&Scoped-define SELF-NAME btnEven
&ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL btnEven C-Win
ON CHOOSE OF btnEven IN FRAME FRAME-V /* Set */
OR MOUSE-SELECT-CLICK OF fiEvenRow
DO:
RUN chooseColor(fiEvenRow:HANDLE).
END.
/* _UIB-CODE-BLOCK-END */
&ANALYZE-RESUME
&Scoped-define FRAME-NAME FRAME-T
&Scoped-define SELF-NAME btnFavouriteTable
&ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL btnFavouriteTable C-Win
ON CHOOSE OF btnFavouriteTable IN FRAME FRAME-T /* Set */
OR MOUSE-SELECT-CLICK OF fiFavouriteTable
DO:
RUN chooseColor(fiFavouriteTable:HANDLE).
END.
/* _UIB-CODE-BLOCK-END */
&ANALYZE-RESUME
&Scoped-define SELF-NAME btnfiCustomFormat
&ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL btnfiCustomFormat C-Win
ON CHOOSE OF btnfiCustomFormat IN FRAME FRAME-T /* Set */
OR MOUSE-SELECT-CLICK OF fiCustomFormat
DO:
RUN chooseColor(fiCustomFormat:HANDLE).
END.
/* _UIB-CODE-BLOCK-END */
&ANALYZE-RESUME
&Scoped-define SELF-NAME btnfiCustomOrder
&ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL btnfiCustomOrder C-Win
ON CHOOSE OF btnfiCustomOrder IN FRAME FRAME-T /* Set */
OR MOUSE-SELECT-CLICK OF fiCustomOrder
DO:
RUN chooseColor(fiCustomOrder:HANDLE).
END.
/* _UIB-CODE-BLOCK-END */
&ANALYZE-RESUME
&Scoped-define SELF-NAME btnFieldFilter
&ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL btnFieldFilter C-Win
ON CHOOSE OF btnFieldFilter IN FRAME FRAME-T /* Set */
OR MOUSE-SELECT-CLICK OF fiFieldFilter
DO:
RUN chooseColor(fiFieldFilter:HANDLE).
END.
/* _UIB-CODE-BLOCK-END */
&ANALYZE-RESUME
&Scoped-define FRAME-NAME FRAME-V
&Scoped-define SELF-NAME btnFilterBox
&ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL btnFilterBox C-Win
ON CHOOSE OF btnFilterBox IN FRAME FRAME-V /* Set */
OR MOUSE-SELECT-CLICK OF fiFilterBox
DO:
RUN chooseColor(fiFilterBox:HANDLE).
END.
/* _UIB-CODE-BLOCK-END */
&ANALYZE-RESUME
&Scoped-define FRAME-NAME FRAME-J
&Scoped-define SELF-NAME btnFixedFont
&ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL btnFixedFont C-Win
ON CHOOSE OF btnFixedFont IN FRAME FRAME-J /* Fixed Font */
DO:
DEFINE VARIABLE iFontNr AS INTEGER NO-UNDO.
DEFINE VARIABLE lOk AS LOGICAL NO-UNDO.
iFontNr = INTEGER(getRegistry('DataDigger:Fonts', 'Fixed')).
RUN adecomm/_chsfont.p
( INPUT "Choose your fixed font"
, INPUT iFontNr
, INPUT-OUTPUT iFontNr
, OUTPUT lOk
).
IF lOk THEN SELF:FONT = iFontNr.
END.
/* _UIB-CODE-BLOCK-END */
&ANALYZE-RESUME
&Scoped-define FRAME-NAME FRAME-T
&Scoped-define SELF-NAME btnIndexInactive
&ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL btnIndexInactive C-Win
ON CHOOSE OF btnIndexInactive IN FRAME FRAME-T /* Set */
OR MOUSE-SELECT-CLICK OF fiIndexInactive
DO:
RUN chooseColor(fiIndexInactive:HANDLE).
END.
/* _UIB-CODE-BLOCK-END */
&ANALYZE-RESUME
&Scoped-define FRAME-NAME FRAME-V
&Scoped-define SELF-NAME btnOdd
&ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL btnOdd C-Win
ON CHOOSE OF btnOdd IN FRAME FRAME-V /* Set */
OR MOUSE-SELECT-CLICK OF fiOddRow
DO:
RUN chooseColor(fiOddRow:HANDLE).
END.
/* _UIB-CODE-BLOCK-END */
&ANALYZE-RESUME
&Scoped-define FRAME-NAME FRAME-T
&Scoped-define SELF-NAME btnPrimIndex
&ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL btnPrimIndex C-Win
ON CHOOSE OF btnPrimIndex IN FRAME FRAME-T /* Set */
OR MOUSE-SELECT-CLICK OF fiPrimIndex
DO:
RUN chooseColor(fiPrimIndex:HANDLE).
END.
/* _UIB-CODE-BLOCK-END */
&ANALYZE-RESUME
&Scoped-define FRAME-NAME FRAME-V
&Scoped-define SELF-NAME btnQueryError
&ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL btnQueryError C-Win
ON CHOOSE OF btnQueryError IN FRAME FRAME-V /* Set */
OR MOUSE-SELECT-CLICK OF fiQueryError
DO:
RUN chooseColor(fiQueryError:HANDLE).
END.
/* _UIB-CODE-BLOCK-END */
&ANALYZE-RESUME
&Scoped-define SELF-NAME btnRecordCountComplete
&ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL btnRecordCountComplete C-Win
ON CHOOSE OF btnRecordCountComplete IN FRAME FRAME-V /* Set */
OR MOUSE-SELECT-CLICK OF fiRecordCountComplete
DO:
RUN chooseColor(fiRecordCountComplete:HANDLE).
END.
/* _UIB-CODE-BLOCK-END */
&ANALYZE-RESUME
&Scoped-define SELF-NAME btnRecordCountIncomplete
&ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL btnRecordCountIncomplete C-Win
ON CHOOSE OF btnRecordCountIncomplete IN FRAME FRAME-V /* Set */
OR MOUSE-SELECT-CLICK OF fiRecordCountIncomplete
DO:
RUN chooseColor(fiRecordCountIncomplete:HANDLE).
END.
/* _UIB-CODE-BLOCK-END */
&ANALYZE-RESUME
&Scoped-define SELF-NAME btnRecordCountSelected
&ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL btnRecordCountSelected C-Win
ON CHOOSE OF btnRecordCountSelected IN FRAME FRAME-V /* Set */
OR MOUSE-SELECT-CLICK OF fiRecordCountSelected
DO:
RUN chooseColor(fiRecordCountSelected:HANDLE).
END.
/* _UIB-CODE-BLOCK-END */
&ANALYZE-RESUME
&Scoped-define FRAME-NAME FRAME-T
&Scoped-define SELF-NAME btnWarningBox
&ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL btnWarningBox C-Win
ON CHOOSE OF btnWarningBox IN FRAME FRAME-T /* Set */
OR MOUSE-SELECT-CLICK OF fiWarningBox
DO:
RUN chooseColor(fiWarningBox:HANDLE).
END.
/* _UIB-CODE-BLOCK-END */
&ANALYZE-RESUME
&Scoped-define FRAME-NAME FRAME-Z
&Scoped-define SELF-NAME rsColumnLabelTemplate
&ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL rsColumnLabelTemplate C-Win
ON VALUE-CHANGED OF rsColumnLabelTemplate IN FRAME FRAME-Z
DO:
fiExample:screen-value =
SUBSTITUTE(SELF:screen-value
, "cust-num"
, "1"
, "Customer Number"
).
END.
/* _UIB-CODE-BLOCK-END */
&ANALYZE-RESUME
&Scoped-define FRAME-NAME FRAME-J
&Scoped-define SELF-NAME tgAutoFont
&ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL tgAutoFont C-Win
ON VALUE-CHANGED OF tgAutoFont IN FRAME FRAME-J /* Automatically set fonts */
DO:
btnDefaultFont:sensitive = NOT SELF:checked.
btnFixedFont :sensitive = NOT SELF:checked.
END.
/* _UIB-CODE-BLOCK-END */
&ANALYZE-RESUME
&Scoped-define FRAME-NAME FRAME-T
&Scoped-define SELF-NAME tgHighlightFavouriteTables
&ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL tgHighlightFavouriteTables C-Win
ON VALUE-CHANGED OF tgHighlightFavouriteTables IN FRAME FRAME-T /* Highlight Favourite tables */
DO:
fiFavouriteTable :SENSITIVE = SELF:CHECKED.
btnFavouriteTable:SENSITIVE = SELF:CHECKED.
END.
/* _UIB-CODE-BLOCK-END */
&ANALYZE-RESUME
&Scoped-define FRAME-NAME FRAME-V
&Scoped-define SELF-NAME tgUseSystemColors
&ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL tgUseSystemColors C-Win
ON VALUE-CHANGED OF tgUseSystemColors IN FRAME FRAME-V /* Use System Colors */
DO:
fiOddRow :SENSITIVE = NOT SELF:CHECKED.
fiEvenRow:SENSITIVE = NOT SELF:CHECKED.
btnOdd :SENSITIVE = NOT SELF:CHECKED.
btnEven :SENSITIVE = NOT SELF:CHECKED.
END.
/* _UIB-CODE-BLOCK-END */
&ANALYZE-RESUME
&Scoped-define FRAME-NAME DEFAULT-FRAME
&UNDEFINE SELF-NAME
&ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _MAIN-BLOCK C-Win
/* *************************** Main Block *************************** */
/* The CLOSE event can be used from inside or outside the procedure to */
/* terminate it. */
ON CLOSE OF THIS-PROCEDURE
RUN disable_UI.
/* Best default for GUI applications is... */
PAUSE 0 BEFORE-HIDE.
/* Handle reparenting, startup etc */
{frameLib.i}
/* Now enable the interface and wait for the exit condition. */
/* (NOTE: handle ERROR and END-KEY so cleanup code will always fire. */
MAIN-BLOCK:
DO ON ERROR UNDO MAIN-BLOCK, LEAVE MAIN-BLOCK
ON END-KEY UNDO MAIN-BLOCK, LEAVE MAIN-BLOCK:
IF NOT THIS-PROCEDURE:PERSISTENT THEN
WAIT-FOR CLOSE OF THIS-PROCEDURE.
END.
/* _UIB-CODE-BLOCK-END */
&ANALYZE-RESUME
/* ********************** Internal Procedures *********************** */
&ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE chooseColor C-Win
PROCEDURE chooseColor :
/* Set color for a field, assign colors to widget
*/
DEFINE INPUT PARAMETER phWidget AS HANDLE NO-UNDO.
DEFINE VARIABLE iBG AS INTEGER NO-UNDO.
DEFINE VARIABLE iFG AS INTEGER NO-UNDO.
DEFINE VARIABLE iSep AS INTEGER NO-UNDO.
DEFINE VARIABLE lOk AS LOGICAL NO-UNDO.
iBg = phWidget:BGCOLOR.
iFg = phWidget:FGCOLOR.
RUN adecomm/_chscolr.p ( "Choose color for " + phWidget:SCREEN-VALUE
, ""
, FALSE
, ?
, ?
, ?
, INPUT-OUTPUT iBG
, INPUT-OUTPUT iFG
, INPUT-OUTPUT iSep
, OUTPUT lOk
).
IF lOk THEN ASSIGN phWidget:FGCOLOR = iFg phWidget:BGCOLOR = iBg.
/*
ipTitle - Title for the dialog
cipMessage - Message to write at bottom of screen
lipSeparator - Indicates if separator colors need to display for browse widgets
iipDfltBgColor - color number to use as default background
iipDfltFgColor - color number to use as default foreground
iipDfltSpColor - color number to use as default separator color
iiopBgColor - background color number
iiopFgColor - foreground color number
iiopSpColor - separator color number
lOk - FALSE if cancelled dialog box.
*/
END PROCEDURE. /* chooseColor */
/* _UIB-CODE-BLOCK-END */
&ANALYZE-RESUME
&ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE disable_UI C-Win _DEFAULT-DISABLE
PROCEDURE disable_UI :
/*------------------------------------------------------------------------------
Purpose: DISABLE the User Interface
Parameters: <none>
Notes: Here we clean-up the user-interface by deleting
dynamic widgets we have created and/or hide
frames. This procedure is usually called when
we are ready to "clean-up" after running.
------------------------------------------------------------------------------*/
/* Delete the WINDOW we created */
IF SESSION:DISPLAY-TYPE = "GUI":U AND VALID-HANDLE(C-Win)
THEN DELETE WIDGET C-Win.
IF THIS-PROCEDURE:PERSISTENT THEN DELETE PROCEDURE THIS-PROCEDURE.
END PROCEDURE.
/* _UIB-CODE-BLOCK-END */
&ANALYZE-RESUME
&ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE enable_UI C-Win _DEFAULT-ENABLE
PROCEDURE enable_UI :
/*------------------------------------------------------------------------------
Purpose: ENABLE the User Interface
Parameters: <none>
Notes: Here we display/view/enable the widgets in the
user-interface. In addition, OPEN all queries
associated with each FRAME and BROWSE.
These statements here are based on the "Other
Settings" section of the widget Property Sheets.
------------------------------------------------------------------------------*/
VIEW FRAME DEFAULT-FRAME IN WINDOW C-Win.
{&OPEN-BROWSERS-IN-QUERY-DEFAULT-FRAME}
DISPLAY tgAutoFont
WITH FRAME FRAME-J IN WINDOW C-Win.
ENABLE RECT-20 tgAutoFont btnDefaultFont btnFixedFont
WITH FRAME FRAME-J IN WINDOW C-Win.
{&OPEN-BROWSERS-IN-QUERY-FRAME-J}
DISPLAY rsTitleBarDbName tgTitleStartsWithTableName
WITH FRAME FRAME-AB IN WINDOW C-Win.
ENABLE RECT-22 rsTitleBarDbName tgTitleStartsWithTableName
WITH FRAME FRAME-AB IN WINDOW C-Win.
{&OPEN-BROWSERS-IN-QUERY-FRAME-AB}
DISPLAY rsColumnLabelTemplate fiExample
WITH FRAME FRAME-Z IN WINDOW C-Win.
ENABLE RECT-19 rsColumnLabelTemplate fiExample
WITH FRAME FRAME-Z IN WINDOW C-Win.
{&OPEN-BROWSERS-IN-QUERY-FRAME-Z}
DISPLAY tgHighlightFavouriteTables fiFavouriteTable fiFieldFilter
fiCustomOrder fiCustomFormat fiWarningBox fiIndexInactive fiPrimIndex
WITH FRAME FRAME-T IN WINDOW C-Win.
ENABLE RECT-14 tgHighlightFavouriteTables fiFavouriteTable btnFavouriteTable
fiFieldFilter btnFieldFilter fiCustomOrder btnfiCustomOrder