Form VL_SAM033: Multi-Form Essentials 3
Name: VL_SAM033
Description: The following RDMLX form demonstrates the essential details of multi-form communications. It should be used in conjunction with forms VL_SAM031 and VL_SAM032.
FUNCTION OPTIONS(*DIRECT);
BEGIN_COM BORDERICONS(Maximize+Minimize+SystemMenu) HEIGHT(205) LEFT(387) TOP(171) WIDTH(416);
* ;
* Form Layout ;
* ;
DEFINE_COM CLASS(#EMPNO.Visual) NAME(#EMPNO) DISPLAYPOSITION(1) HEIGHT(19) LEFT(16) PARENT(#COM_OWNER) TABPOSITION(1) TOP(40) WIDTH(209);
DEFINE_COM CLASS(#SURNAME.Visual) NAME(#SURNAME) DISPLAYPOSITION(2) HEIGHT(19) LEFT(16) PARENT(#COM_OWNER) TABPOSITION(2) TOP(72) WIDTH(324);
DEFINE_COM CLASS(#SALARY.Visual) NAME(#SALARY) DISPLAYPOSITION(3) HEIGHT(19) LEFT(16) PARENT(#COM_OWNER) TABPOSITION(3) TOP(104) WIDTH(278);
DEFINE_COM CLASS(#DATE.Visual) NAME(#DATE) DISPLAYPOSITION(4) HEIGHT(19) LEFT(16) MARGINLEFT(169) PARENT(#COM_OWNER) TABPOSITION(4) TOP(140) WIDTH(236);
DEFINE_COM CLASS(#PRIM_LABL) NAME(#LABL_1) CAPTION('Details entered on this form should be immediately reflected onto the other 2 forms ') DISPLAYPOSITION(5) HEIGHT(25) LEFT(17) PARENT(#COM_OWNER) TABPOSITION(5) TABSTOP(False) TOP(8) WIDTH(401);
DEFINE_COM CLASS(#PRIM_PHBN) NAME(#BTN_CLEAR) CAPTION('Clear Fields') DISPLAYPOSITION(6) LEFT(320) PARENT(#COM_OWNER) TABPOSITION(6) TOP(144);
* ;
* Define Properties (all sets and gets automatically);
* ;
define_pty name(CurrEmpno) set(*auto #empno) get(*auto #empno);
define_pty name(CurrSurname) set(*auto #Surname) get(*auto #Surname);
define_pty name(CurrSalary) set(*auto #Salary) get(*auto #Salary);
define_pty name(CurrDate) set(*auto #date) get(*auto #date);
* ;
* Define Events;
* ;
define_evt name(EmpnoChanged);
define_evt name(SurnameChanged);
define_evt name(SalaryChanged);
define_evt name(DateChanged);
* ;
* Form Initialization;
* ;
EVTROUTINE handling(#com_owner.Initialize);
SET #com_owner caption('Form 3');
ENDROUTINE ;
* ;
* On change of value on form signal event to other forms;
* ;
evtroutine (#empno.changed);
signal empnochanged;
endroutine ;
evtroutine (#surname.changed);
signal surnamechanged;
endroutine ;
evtroutine (#salary.changed);
signal salarychanged;
endroutine ;
evtroutine (#date.changed);
signal datechanged;
endroutine ;
* ;
* Handle the clear fields button;
* ;
EVTROUTINE HANDLING(#BTN_CLEAR.Click);
change (#empno #surname #salary #date) *null;
signal empnochanged;
signal surnamechanged;
signal salarychanged;
signal datechanged;
ENDROUTINE ;
END_COM ;
Name: VL_SAM033
Description: The following RDMLX form demonstrates the essential details of multi-form communications. It should be used in conjunction with forms VL_SAM031 and VL_SAM032.
FUNCTION OPTIONS(*DIRECT);
BEGIN_COM BORDERICONS(Maximize+Minimize+SystemMenu) HEIGHT(205) LEFT(387) TOP(171) WIDTH(416);
* ;
* Form Layout ;
* ;
DEFINE_COM CLASS(#EMPNO.Visual) NAME(#EMPNO) DISPLAYPOSITION(1) HEIGHT(19) LEFT(16) PARENT(#COM_OWNER) TABPOSITION(1) TOP(40) WIDTH(209);
DEFINE_COM CLASS(#SURNAME.Visual) NAME(#SURNAME) DISPLAYPOSITION(2) HEIGHT(19) LEFT(16) PARENT(#COM_OWNER) TABPOSITION(2) TOP(72) WIDTH(324);
DEFINE_COM CLASS(#SALARY.Visual) NAME(#SALARY) DISPLAYPOSITION(3) HEIGHT(19) LEFT(16) PARENT(#COM_OWNER) TABPOSITION(3) TOP(104) WIDTH(278);
DEFINE_COM CLASS(#DATE.Visual) NAME(#DATE) DISPLAYPOSITION(4) HEIGHT(19) LEFT(16) MARGINLEFT(169) PARENT(#COM_OWNER) TABPOSITION(4) TOP(140) WIDTH(236);
DEFINE_COM CLASS(#PRIM_LABL) NAME(#LABL_1) CAPTION('Details entered on this form should be immediately reflected onto the other 2 forms ') DISPLAYPOSITION(5) HEIGHT(25) LEFT(17) PARENT(#COM_OWNER) TABPOSITION(5) TABSTOP(False) TOP(8) WIDTH(401);
DEFINE_COM CLASS(#PRIM_PHBN) NAME(#BTN_CLEAR) CAPTION('Clear Fields') DISPLAYPOSITION(6) LEFT(320) PARENT(#COM_OWNER) TABPOSITION(6) TOP(144);
* ;
* Define Properties (all sets and gets automatically);
* ;
define_pty name(CurrEmpno) set(*auto #empno) get(*auto #empno);
define_pty name(CurrSurname) set(*auto #Surname) get(*auto #Surname);
define_pty name(CurrSalary) set(*auto #Salary) get(*auto #Salary);
define_pty name(CurrDate) set(*auto #date) get(*auto #date);
* ;
* Define Events;
* ;
define_evt name(EmpnoChanged);
define_evt name(SurnameChanged);
define_evt name(SalaryChanged);
define_evt name(DateChanged);
* ;
* Form Initialization;
* ;
EVTROUTINE handling(#com_owner.Initialize);
SET #com_owner caption('Form 3');
ENDROUTINE ;
* ;
* On change of value on form signal event to other forms;
* ;
evtroutine (#empno.changed);
signal empnochanged;
endroutine ;
evtroutine (#surname.changed);
signal surnamechanged;
endroutine ;
evtroutine (#salary.changed);
signal salarychanged;
endroutine ;
evtroutine (#date.changed);
signal datechanged;
endroutine ;
* ;
* Handle the clear fields button;
* ;
EVTROUTINE HANDLING(#BTN_CLEAR.Click);
change (#empno #surname #salary #date) *null;
signal empnochanged;
signal surnamechanged;
signal salarychanged;
signal datechanged;
ENDROUTINE ;
END_COM ;