Consultor Eletrônico



Kbase P111941: How to programmatically disable 'Apply Filter' button from ADM2 SmartFilter within SmartWindow conta
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   19/12/2005
Status: Unverified

GOAL:

How to programmatically disable 'Apply Filter' button from ADM2 SmartFilter within SmartWindow container

FIX:

In the SmartWindow, the following code can be used in order to
disable the 'Apply Filter' button of the SmartFilter instance:
/* h_dcust represents the handle of the SDO being used with SmartFilter*/
DEFINE VARIABLE cEnabledObjHdls AS CHARACTER NO-UNDO.
DEFINE VARIABLE i AS INTEGER NO-UNDO.
DEFINE VARIABLE hObject AS HANDLE NO-UNDO.
hObject = DYNAMIC-FUNCTION('getFilterSource' in h_dcust).
cEnabledObjHdls = DYNAMIC-FUNCTION('getEnabledObjHdls':U IN hObject).
DO i = 1 TO NUM-ENTRIES (cEnabledObjHdls):
hObject = WIDGET-HANDLE (ENTRY (i, cEnabledObjHdls)).
IF hObject:NAME = 'BtnApply' THEN DO:
hObject:SENSITIVE = FALSE.
LEAVE.
END.
END.