1
|
DEFINE BUTTON Btn_Cancel AUTO-END-KEY
|
2
|
LABEL "Cancel"
|
3
|
SIZE 15 BY 1.14.
|
4
|
|
5
|
/*
|
6
|
DEFINE VARIABLE roomRate AS DECIMAL FORMAT "$ >>>,>>9.99":U INITIAL 0 -- as in hotel gui demo
|
7
|
DEFINE VARIABLE roomRate AS DECIMAL FORMAT ">>>,>>9.99":U INITIAL 56.78 -- left alighned
|
8
|
*/
|
9
|
DEFINE VARIABLE roomRate AS DECIMAL FORMAT "$>>>,>>9.99":U INITIAL 56.78
|
10
|
LABEL "Rate for Day"
|
11
|
VIEW-AS FILL-IN
|
12
|
SIZE 14 BY 1 NO-UNDO.
|
13
|
|
14
|
DEFINE FRAME gDialog
|
15
|
roomRate AT ROW 6 COL 15.2 COLON-ALIGNED WIDGET-ID 8
|
16
|
Btn_Cancel AT ROW 8.14 COL 20
|
17
|
SPACE(15.79) SKIP(3.03)
|
18
|
WITH VIEW-AS DIALOG-BOX KEEP-TAB-ORDER
|
19
|
SIDE-LABELS NO-UNDERLINE THREE-D SCROLLABLE
|
20
|
/* FONT 8 */
|
21
|
TITLE "Update Rate"
|
22
|
CANCEL-BUTTON Btn_Cancel WIDGET-ID 100.
|
23
|
|
24
|
PROCEDURE enable_UI :
|
25
|
/*------------------------------------------------------------------------------
|
26
|
Purpose: ENABLE the User Interface
|
27
|
Parameters: <none>
|
28
|
Notes: Here we display/view/enable the widgets in the
|
29
|
user-interface. In addition, OPEN all queries
|
30
|
associated with each FRAME and BROWSE.
|
31
|
These statements here are based on the "Other
|
32
|
Settings" section of the widget Property Sheets.
|
33
|
------------------------------------------------------------------------------*/
|
34
|
DISPLAY roomRate
|
35
|
WITH FRAME gDialog.
|
36
|
ENABLE roomRate Btn_Cancel
|
37
|
WITH FRAME gDialog.
|
38
|
VIEW FRAME gDialog.
|
39
|
|
40
|
END PROCEDURE.
|
41
|
|
42
|
/* Now enable the interface and wait for the exit condition. */
|
43
|
/* (NOTE: handle ERROR and END-KEY so cleanup code will always fire. */
|
44
|
MAIN-BLOCK:
|
45
|
DO ON ERROR UNDO MAIN-BLOCK, LEAVE MAIN-BLOCK
|
46
|
ON END-KEY UNDO MAIN-BLOCK, LEAVE MAIN-BLOCK:
|
47
|
RUN enable_UI.
|
48
|
WAIT-FOR GO OF FRAME gDialog .
|
49
|
END.
|
50
|
|