Project

General

Profile

bug3691.p

Alexei Kaigorodov, 06/07/2019 09:56 AM

Download (1.77 KB)

 
1
DEFINE BUTTON Btn_Cancel AUTO-END-KEY 
2
     LABEL "Cancel" 
3
     SIZE 15 BY 1.14.
4

    
5
//DEFINE VARIABLE roomRate AS DECIMAL FORMAT "$ >>>,>>9.99":U INITIAL 0  -- as in hotel gui demo
6
//DEFINE VARIABLE roomRate AS DECIMAL FORMAT ">>>,>>9.99":U INITIAL 56.78 -- left alighned
7
DEFINE VARIABLE roomRate AS DECIMAL FORMAT "$>>>,>>9.99":U INITIAL 56.78
8
     LABEL "Rate for Day"
9
     VIEW-AS FILL-IN 
10
     SIZE 14 BY 1 NO-UNDO.
11

    
12
DEFINE FRAME gDialog
13
     roomRate AT ROW 6 COL 15.2 COLON-ALIGNED WIDGET-ID 8
14
     Btn_Cancel AT ROW 8.14 COL 20
15
     SPACE(15.79) SKIP(3.03)
16
     WITH VIEW-AS DIALOG-BOX KEEP-TAB-ORDER 
17
         SIDE-LABELS NO-UNDERLINE THREE-D  SCROLLABLE 
18
        // FONT 8
19
         TITLE "Update Rate"
20
         CANCEL-BUTTON Btn_Cancel WIDGET-ID 100.
21

    
22
PROCEDURE enable_UI :
23
/*------------------------------------------------------------------------------
24
  Purpose:     ENABLE the User Interface
25
  Parameters:  <none>
26
  Notes:       Here we display/view/enable the widgets in the
27
               user-interface.  In addition, OPEN all queries
28
               associated with each FRAME and BROWSE.
29
               These statements here are based on the "Other 
30
               Settings" section of the widget Property Sheets.
31
------------------------------------------------------------------------------*/
32
  DISPLAY roomRate 
33
      WITH FRAME gDialog.
34
  ENABLE roomRate Btn_Cancel 
35
      WITH FRAME gDialog.
36
  VIEW FRAME gDialog.
37
  
38
END PROCEDURE.
39

    
40
/* Now enable the interface and wait for the exit condition.            */
41
/* (NOTE: handle ERROR and END-KEY so cleanup code will always fire.    */
42
MAIN-BLOCK:
43
DO ON ERROR   UNDO MAIN-BLOCK, LEAVE MAIN-BLOCK
44
   ON END-KEY UNDO MAIN-BLOCK, LEAVE MAIN-BLOCK:
45
  RUN enable_UI.
46
  WAIT-FOR GO OF FRAME gDialog .
47
END.
48