Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This example uses three list views. At start up all employees are added to the All Employees and Not Selected Employees list views. As employees are selected and deselected from the All Employees list they are added to and removed from the Selected Employees and Not Selected Employees list.  Image Removed

Image Added

To see how the example works, copy this code and paste it to a form component:
FUNCTION options(*DIRECT)
BEGIN_COM role(*EXTENDS #PRIM_FORM) HEIGHT(378) LEFT(345) TOP(196) WIDTH(473)
DEFINE_COM class(#PRIM_LTVW) name(#ALL_LIST) DISPLAYPOSITION(1) FULLROWSELECT(True) HEIGHT(313) LEFT(8) PARENT(#GPBX_ALL) TABPOSITION(1) TOP(16) WIDTH(129)
DEFINE_COM class(#PRIM_LTVW) name(#SEL_LIST) DISPLAYPOSITION(1) FULLROWSELECT(True) HEIGHT(313) LEFT(8) PARENT(#GPBX_SEL) TABPOSITION(1) TOP(16) WIDTH(129)
DEFINE_COM class(#PRIM_LTVW) name(#NOT_LIST) DISPLAYPOSITION(1) FULLROWSELECT(True) HEIGHT(313) LEFT(8) PARENT(#GPBX_NOT) TABPOSITION(1) TOP(16) WIDTH(129)
DEFINE_COM class(#PRIM_LVCL) name(#LVCL_1) DISPLAYPOSITION(1) PARENT(#ALL_LIST) SORTPOSITION(1) SOURCE(#EMPNO) WIDTH(54) WIDTHTYPE(Remainder)
DEFINE_COM class(#PRIM_LVCL) name(#LVCL_2) DISPLAYPOSITION(1) PARENT(#SEL_LIST) SORTPOSITION(1) SOURCE(#EMPNO) WIDTH(54) WIDTHTYPE(Remainder)
DEFINE_COM class(#PRIM_LVCL) name(#LVCL_3) DISPLAYPOSITION(1) PARENT(#NOT_LIST) SORTPOSITION(1) SOURCE(#EMPNO) WIDTH(54) WIDTHTYPE(Remainder)
DEFINE_COM class(#PRIM_GPBX) name(#GPBX_ALL) CAPTION('All Employees') DISPLAYPOSITION(3) HEIGHT(337) LEFT(8) PARENT(#COM_OWNER) TABPOSITION(3) TABSTOP(False) TOP(8) WIDTH(145)
DEFINE_COM class(#PRIM_GPBX) name(#GPBX_SEL) CAPTION('Selected Employees') DISPLAYPOSITION(2) HEIGHT(338) LEFT(156) PARENT(#COM_OWNER) TABPOSITION(2) TABSTOP(False) TOP(6) WIDTH(145)
DEFINE_COM class(#PRIM_GPBX) name(#GPBX_NOT) CAPTION('NOT Selected Employees') DISPLAYPOSITION(1) HEIGHT(339) LEFT(304) PARENT(#COM_OWNER) TABPOSITION(1) TABSTOP(False) TOP(5) WIDTH(145)
DEFINE field(#SEL_EMPNO) reffld(#EMPNO)
EVTROUTINE handling(#com_owner.Initialize)

...