Form S_161FED: Dynamic Enablement and Disablement

LANSA

Form S_161FED: Dynamic Enablement and Disablement
Name: S_161FED

Description: The following RDMLX form demonstrates the dynamic enablement and disablement of 7 individual push buttons.
FUNCTION OPTIONS(*DIRECT);
BEGIN_COM BORDERICONS(Maximize+Minimize+SystemMenu) HEIGHT(244) LEFT(440) TOP(157) WIDTH(304);
;
DEFINE_COM CLASS(#EMPNO.Visual) NAME(#EMPNO) DISPLAYPOSITION(1) HEIGHT(19) LEFT(16) PARENT(#COM_OWNER) TABPOSITION(1) TOP(16) WIDTH(209);
DEFINE_COM CLASS(#SECTION.Visual) NAME(#SECTION) DISPLAYPOSITION(3) HEIGHT(19) LEFT(16) PARENT(#COM_OWNER) TABPOSITION(3) TOP(80) WIDTH(185);
DEFINE_COM CLASS(#DEPTMENT.Visual) NAME(#DEPTMENT) DISPLAYPOSITION(2) HEIGHT(19) LEFT(16) PARENT(#COM_OWNER) TABPOSITION(2) TOP(48) WIDTH(201);
DEFINE_COM CLASS(#PRIM_PHBN) NAME(#BTN_E) CAPTION(E) DISPLAYPOSITION(4) ENABLED(False) LEFT(16) PARENT(#COM_OWNER) TABPOSITION(4) TOP(112);
DEFINE_COM CLASS(#PRIM_PHBN) NAME(#BTN_D) CAPTION(D) DISPLAYPOSITION(5) ENABLED(False) LEFT(112) PARENT(#COM_OWNER) TABPOSITION(5) TOP(112);
DEFINE_COM CLASS(#PRIM_PHBN) NAME(#BTN_S) CAPTION(S) DISPLAYPOSITION(6) ENABLED(False) LEFT(200) PARENT(#COM_OWNER) TABPOSITION(6) TOP(112);
DEFINE_COM CLASS(#PRIM_PHBN) NAME(#BTN_EAD) CAPTION(EaD) DISPLAYPOSITION(7) ENABLED(False) LEFT(16) PARENT(#COM_OWNER) TABPOSITION(7) TOP(144);
DEFINE_COM CLASS(#PRIM_PHBN) NAME(#BTN_EAS) CAPTION(EaS) DISPLAYPOSITION(8) ENABLED(False) LEFT(112) PARENT(#COM_OWNER) TABPOSITION(8) TOP(144);
DEFINE_COM CLASS(#PRIM_PHBN) NAME(#BTN_DAS) CAPTION(DaS) DISPLAYPOSITION(9) ENABLED(False) LEFT(200) PARENT(#COM_OWNER) TABPOSITION(9) TOP(144);
DEFINE_COM CLASS(#PRIM_PHBN) NAME(#BTN_EDS) CAPTION(EDS) DISPLAYPOSITION(10) ENABLED(False) LEFT(16) PARENT(#COM_OWNER) TABPOSITION(10) TOP(184);
;
DEF_COND NAME(*E) COND('#empno *ne *blanks');
DEF_COND NAME(*D) COND('#deptment *ne *blanks');
DEF_COND NAME(*S) COND('#section *ne *blanks');
DEF_COND NAME(*EAD) COND('*e and *d');
DEF_COND NAME(*EAS) COND('*e and *s');
DEF_COND NAME(*DAS) COND('*d and *s');
DEF_COND NAME(*EDS) COND('*e and *d and *s');
;
evtroutine handling( #empno.changed #deptment.changed #section.changed) ;
set #btn_e enabled(*e);
set #btn_d enabled(*d);
set #btn_s enabled(*s);
set #btn_ead enabled(*ead);
set #btn_eas enabled(*eas);
set #btn_das enabled(*das);
set #btn_eds enabled(*eds);
endroutine ;
;
END_COM ;