S_230FA

LANSA

S_230FA
* ===================================================================
*
* Component : S_230FA
* Type : Form
* Ancestor : PRIM_FORM
*
* Description : This is an example of a form that uses #S_230RH1
* to manage the display of it's help text.
*
* 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) Caption('CHM Help Main Example Form') Height(141) Left(269) Top(250) Visualstyle(#VS_NORM) Width(479)

* ========================
* Define this forms layout
* ========================

Define_Com Class(#EMPNO.Visual) Name(#EMPNO) Displayposition(1) Height(19) Left(11) Parent(#COM_OWNER) Tabposition(1) Top(11) Width(209)
Define_Com Class(#SURNAME.Visual) Name(#SURNAME) Displayposition(2) Height(19) Left(11) Parent(#COM_OWNER) Tabposition(2) Top(38) Width(324)
Define_Com Class(#PRIM_PHBN) Name(#OK_BUTTON) Caption('OK') Displayposition(3) Left(376) Parent(#COM_OWNER) Tabposition(3) Top(15)
Define_Com Class(#PRIM_PHBN) Name(#CANCEL_BUTTON) Caption('Cancel') Displayposition(4) Left(376) Parent(#COM_OWNER) Tabposition(4) Top(45)
Define_Com Class(#PRIM_PHBN) Name(#HELP_BUTTON) Caption('Help') Displayposition(5) Left(378) Parent(#COM_OWNER) Tabposition(5) Top(80)

* =======================================
* Define S_230RH1 as the "Help Interface"
* =======================================

Define_Com Class(#S_230RH1) Name(#HELP_INTERFACE)

* ================================================
* Define tha additional demonstration form S_230FB
* ================================================

Define_Com Class(#S_230FB)

* =================
* Handle Initialize
* =================

Evtroutine Handling(#Com_Owner.Initialize) Options(*NOCLEARERRORS *NOCLEARMESSAGES)

* Display the secondary demonstration for S_203FB

Invoke #S_230FB.ShowForm

* Register for help management. Tell the interface what this form is
* and about any help or guide buttons that are to be automatically
* managed. In this case only a help button exists.

Invoke #Help_Interface.uRegisterforHelp uForm(#Com_Owner) uHelpButton(#Help_Button) uGuideButton(*NUll)

Endroutine

* ==================
* Handle Termination
* ==================

Evtroutine Handling(#Com_Owner.Closing) Options(*NOCLEARERRORS *NOCLEARMESSAGES)

* Unregister for help management

Invoke #Help_Interface.uUnRegisterforHelp

Endroutine

* ====================
* Handle Cancel Button
* ====================

Evtroutine Handling(#Cancel_Button.Click) Options(*NOCLEARERRORS *NOCLEARMESSAGES)
Invoke #Com_Owner.CloseForm
Endroutine

* =======================================================================
* When any of major controls that has help text receives focus, tell
* the help interface which control now defines the current help topic
* =======================================================================

Evtroutine Handling(#EmpNo.GotFocus #SurName.GotFocus #OK_Button.GotFocus #Cancel_Button.GotFocus) Com_Sender(#SenderComponent) Options(*NOCLEARERRORS *NOCLEARMESSAGES)
Invoke #Help_Interface.uSetCurrentTopic uForComponent(#SenderComponent)
Endroutine

END_COM