S_228FA

LANSA

S_228FA
* ===================================================================
*
* Component : S_228FA
* Type : Form
* Ancestor : PRIM_FORM
*
* Description : Using VerticalScroll and HorizontalScroll in a Panel
*
* Disclaimer : The following material is supplied as example material
* only. No warranty concerning this material or its use
* in any way whatsoever is expressed or implied.
*
* ===================================================================
Function Options(*DIRECT)
Begin_Com Role(*EXTENDS #PRIM_FORM) Height(315) Layoutmanager(#ATLM_1) Left(317) Top(130) Visible(False) Width(268)

* Define the Panel and its Layout Manager. Note the HorizontalScroll and VerticalScroll in the Panel Definition.

Define_Com Class(#PRIM_PANL) Name(#PANL_1) Displayposition(1) Height(288) Horizontalscroll(True) Left(0) Parent(#COM_OWNER) Tabposition(1) Tabstop(False) Top(0) Verticalscroll(True) Visualstyle(#S_228VN) Width(260)

* Define the visual components

Define_Com Class(#EMPNO.Visual) Name(#EMPNO) Displayposition(1) Height(19) Left(8) Parent(#PANL_1) Tabposition(1) Top(8) Width(209)
Define_Com Class(#PRIM_PHBN) Name(#FETCH_BUTTON) Buttondefault(True) Caption('Fetch Details') Displayposition(2) Left(16) Parent(#PANL_1) Tabposition(2) Top(360) Width(97)
Define_Com Class(#SURNAME.Visual) Name(#SURNAME) Displayposition(3) Height(19) Left(8) Parent(#PANL_1) Tabposition(3) Top(48) Width(324)
Define_Com Class(#GIVENAME.Visual) Name(#GIVENAME) Displayposition(4) Height(19) Left(8) Parent(#PANL_1) Tabposition(4) Top(84) Width(324)
Define_Com Class(#ADDRESS1.Visual) Name(#ADDRESS1) Displayposition(5) Height(19) Left(8) Parent(#PANL_1) Tabposition(5) Top(120) Width(321)
Define_Com Class(#ADDRESS2.Visual) Name(#ADDRESS2) Displayposition(6) Height(19) Left(6) Parent(#PANL_1) Tabposition(6) Top(160) Width(323)
Define_Com Class(#POSTCODE.Visual) Name(#POSTCODE) Displayposition(7) Height(19) Left(5) Parent(#PANL_1) Tabposition(7) Top(200) Width(216)
Define_Com Class(#DEPTMENT.Visual) Name(#DEPTMENT) Displayposition(8) Height(19) Left(8) Parent(#PANL_1) Tabposition(8) Top(240) Width(201)
Define_Com Class(#SECTION.Visual) Name(#SECTION) Displayposition(9) Height(19) Left(8) Parent(#PANL_1) Tabposition(9) Top(280) Width(185)
Define_Com Class(#SALARY.Visual) Name(#SALARY) Displayposition(10) Height(19) Left(8) Parent(#PANL_1) Tabposition(10) Top(320) Width(241)
Define_Com Class(#PRIM_ATLM) Name(#ATLM_1)
Define_Com Class(#PRIM_ATLI) Name(#ATLI_1) Attachment(Center) Manage(#PANL_1) Parent(#ATLM_1)

* Define Group for Employee record fetch

Group_By Name(#EMPGRP) Fields(#SURNAME #GIVENAME #ADDRESS1 #ADDRESS2 #POSTCODE #PHONEHME #DEPTMENT #SECTION #SALARY)

* Fetch Employee Details and Display Message if Not found

Evtroutine Handling(#Fetch_Button.Click)
Fetch Fields(#EMPGRP) From_File(PSLMST) With_Key(#EMPNO)
If_Status Is_Not(*OKAY)
Use Builtin(MESSAGE_BOX_SHOW) With_Args(OK OK WARNING *COMPONENT 'Employee was not found')
Endif
Endroutine

End_Com