&ANALYZE-SUSPEND _VERSION-NUMBER AB_v10r12 GUI ADM2 &ANALYZE-RESUME &Scoped-define WINDOW-NAME CURRENT-WINDOW &Scoped-define FRAME-NAME gFilter {adecomm/appserv.i} &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _DEFINITIONS gFilter /*------------------------------------------------------------------------ File: Description: from cntnrdlg.w - ADM2 SmartDialog Template Input Parameters: Output Parameters: Author: Created: ------------------------------------------------------------------------*/ /* This .W file was created with the Progress AppBuilder. */ /*----------------------------------------------------------------------*/ /* Create an unnamed pool to store all the widgets created by this procedure. This is a good default which assures that this procedure's triggers and internal procedures will execute in this procedure's storage, and that proper cleanup will occur on deletion of the procedure. */ CREATE WIDGET-POOL. /* *************************** Definitions ************************** */ /* Parameters Definitions --- */ DEF INPUT PARAMETER ipFelder AS CHAR NO-UNDO. DEF OUTPUT PARAMETER opFeld AS CHAR NO-UNDO. DEF OUTPUT PARAMETER opWert AS CHAR NO-UNDO. /* Local Variable Definitions --- */ { incl/dlgdefinition.i } { src/adm2/widgetprto.i } /* _UIB-CODE-BLOCK-END */ &ANALYZE-RESUME &ANALYZE-SUSPEND _UIB-PREPROCESSOR-BLOCK /* ******************** Preprocessor Definitions ******************** */ &Scoped-define PROCEDURE-TYPE SmartDialog &Scoped-define DB-AWARE no &Scoped-define ADM-CONTAINER DIALOG-BOX &Scoped-define ADM-SUPPORTED-LINKS Data-Target,Data-Source,Page-Target,Update-Source,Update-Target /* Name of designated FRAME-NAME and/or first browse and/or first query */ &Scoped-define FRAME-NAME gFilter /* Standard List Definitions */ &Scoped-Define ENABLED-OBJECTS RECT-2 Sel_Felder F_Filter Btn_OK Btn_Cancel &Scoped-Define DISPLAYED-OBJECTS Sel_Felder F_Filter /* Custom List Definitions */ /* List-1,List-2,List-3,List-4,List-5,List-6 */ /* _UIB-PREPROCESSOR-BLOCK-END */ &ANALYZE-RESUME /* *********************** Control Definitions ********************** */ /* Define a dialog box */ /* Definitions of the field level widgets */ DEFINE BUTTON Btn_Cancel AUTO-END-KEY LABEL "abbrechen" SIZE 15 BY 1. DEFINE BUTTON Btn_OK AUTO-GO LABEL "OK" SIZE 15 BY 1. DEFINE VARIABLE F_Filter AS CHARACTER FORMAT "X(256)":U LABEL "Feldinhalt" VIEW-AS FILL-IN NATIVE SIZE 21.8 BY 1 TOOLTIP "mit ~"~" kann nach ~"Leer~" abgefragt werden" BGCOLOR 15 NO-UNDO. DEFINE RECTANGLE RECT-2 EDGE-PIXELS 2 GRAPHIC-EDGE NO-FILL SIZE 60 BY 7.14. DEFINE VARIABLE Sel_Felder AS CHARACTER VIEW-AS SELECTION-LIST SINGLE SCROLLBAR-VERTICAL SIZE 46 BY 4.52 BGCOLOR 15 NO-UNDO. /* ************************ Frame Definitions *********************** */ DEFINE FRAME gFilter Sel_Felder AT ROW 2 COL 9.8 NO-LABEL WIDGET-ID 4 F_Filter AT ROW 7.19 COL 18 COLON-ALIGNED WIDGET-ID 6 Btn_OK AT ROW 10 COL 12.2 Btn_Cancel AT ROW 10 COL 33.4 RECT-2 AT ROW 1.48 COL 3 WIDGET-ID 2 SPACE(1.99) SKIP(2.94) WITH VIEW-AS DIALOG-BOX KEEP-TAB-ORDER SIDE-LABELS NO-UNDERLINE THREE-D SCROLLABLE TITLE "Filterwert eingeben" CANCEL-BUTTON Btn_Cancel WIDGET-ID 100. /* *********************** Procedure Settings ************************ */ &ANALYZE-SUSPEND _PROCEDURE-SETTINGS /* Settings for THIS-PROCEDURE Type: SmartDialog Allow: Basic,Browse,DB-Fields,Query,Smart Container Links: Data-Target,Data-Source,Page-Target,Update-Source,Update-Target Design Page: 1 Other Settings: COMPILE APPSERVER */ &ANALYZE-RESUME _END-PROCEDURE-SETTINGS &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _INCLUDED-LIB gFilter /* ************************* Included-Libraries *********************** */ {src/adm2/containr.i} /* _UIB-CODE-BLOCK-END */ &ANALYZE-RESUME /* *********** Runtime Attributes and AppBuilder Settings *********** */ &ANALYZE-SUSPEND _RUN-TIME-ATTRIBUTES /* SETTINGS FOR DIALOG-BOX gFilter FRAME-NAME */ ASSIGN FRAME gFilter:SCROLLABLE = FALSE FRAME gFilter:HIDDEN = TRUE. /* _RUN-TIME-ATTRIBUTES-END */ &ANALYZE-RESUME /* Setting information for Queries and Browse Widgets fields */ &ANALYZE-SUSPEND _QUERY-BLOCK DIALOG-BOX gFilter /* Query rebuild information for DIALOG-BOX gFilter _Options = "SHARE-LOCK" _Query is NOT OPENED */ /* DIALOG-BOX gFilter */ &ANALYZE-RESUME /* ************************ Control Triggers ************************ */ &Scoped-define SELF-NAME gFilter &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL gFilter gFilter ON END-ERROR OF FRAME gFilter /* Filterwert eingeben */ DO: RUN ENDE. RETURN NO-APPLY. END. /* _UIB-CODE-BLOCK-END */ &ANALYZE-RESUME &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL gFilter gFilter ON WINDOW-CLOSE OF FRAME gFilter /* Filterwert eingeben */ DO: RUN ENDE. RETURN NO-APPLY. END. /* _UIB-CODE-BLOCK-END */ &ANALYZE-RESUME &Scoped-define SELF-NAME Btn_Cancel &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL Btn_Cancel gFilter ON CHOOSE OF Btn_Cancel IN FRAME gFilter /* abbrechen */ DO: RUN ENDE. RETURN NO-APPLY. END. /* _UIB-CODE-BLOCK-END */ &ANALYZE-RESUME &Scoped-define SELF-NAME Btn_OK &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL Btn_OK gFilter ON CHOOSE OF Btn_OK IN FRAME gFilter /* OK */ DO: btnOK = TRUE. RUN ENDE. RETURN NO-APPLY. END. /* _UIB-CODE-BLOCK-END */ &ANALYZE-RESUME &UNDEFINE SELF-NAME &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _MAIN-BLOCK gFilter /* *************************** Main Block *************************** */ { incl/dlgmainblock.i } {src/adm2/dialogmn.i} /* _UIB-CODE-BLOCK-END */ &ANALYZE-RESUME /* ********************** Internal Procedures *********************** */ &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE adm-create-objects gFilter _ADM-CREATE-OBJECTS PROCEDURE adm-create-objects : /*------------------------------------------------------------------------------ Purpose: Create handles for all SmartObjects used in this procedure. After SmartObjects are initialized, then SmartLinks are added. Parameters: ------------------------------------------------------------------------------*/ END PROCEDURE. /* _UIB-CODE-BLOCK-END */ &ANALYZE-RESUME &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE disable_UI gFilter _DEFAULT-DISABLE PROCEDURE disable_UI : /*------------------------------------------------------------------------------ Purpose: DISABLE the User Interface Parameters: 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. ------------------------------------------------------------------------------*/ /* Hide all frames. */ HIDE FRAME gFilter. END PROCEDURE. /* _UIB-CODE-BLOCK-END */ &ANALYZE-RESUME &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE enableObject gFilter PROCEDURE enableObject : /*------------------------------------------------------------------------------ Purpose: Super Override Parameters: Notes: ------------------------------------------------------------------------------*/ { incl/dlgenableobject.i } DO WITH FRAME {&FRAME-NAME}: Sel_Felder:DELIMITER = CHR(01). Sel_Felder:LIST-ITEM-PAIRS = ipFelder. END. END PROCEDURE. /* _UIB-CODE-BLOCK-END */ &ANALYZE-RESUME &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE enable_UI gFilter _DEFAULT-ENABLE PROCEDURE enable_UI : /*------------------------------------------------------------------------------ Purpose: ENABLE the User Interface Parameters: 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. ------------------------------------------------------------------------------*/ DISPLAY Sel_Felder F_Filter WITH FRAME gFilter. ENABLE RECT-2 Sel_Felder F_Filter Btn_OK Btn_Cancel WITH FRAME gFilter. VIEW FRAME gFilter. {&OPEN-BROWSERS-IN-QUERY-gFilter} END PROCEDURE. /* _UIB-CODE-BLOCK-END */ &ANALYZE-RESUME &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE ENDE gFilter PROCEDURE ENDE : /*------------------------------------------------------------------------------ Purpose: Parameters: Notes: ------------------------------------------------------------------------------*/ IF BtnOK THEN DO WITH FRAME {&FRAME-NAME}: opFeld = Sel_Felder:SCREEN-VALUE. opWert = F_Filter :SCREEN-VALUE. IF opWert = '""' THEN ASSIGN opWert = ''. IF opWert = '' THEN ASSIGN opFeld = '%ENDE%'. END. { incl/dlgende.i } END PROCEDURE. /* _UIB-CODE-BLOCK-END */ &ANALYZE-RESUME