Form S_155FA: Browser/Detailer

LANSA

Form S_155FA: Browser/Detailer
Name: S_155FA

Description: The following RDMLX form is part of the BASE_xxxx series of examples that have been designed to provide you with base examples of common layout and functionality that you may choose to reuse when constructing your own applications.
* ===================================================================
*
* Component : S_155FA
* Type : Form
* Ancestor : PRIM_FORM
*
* Description : Browser / Detailer Form
* The following RDMLX form is part of the S_155xxx series of examples that have been
* designed to provide you with base examples of common layout and functionality
* that you may choose to reuse when constructing your own applications.
*
* Disclaimer : The following material is supplied as sample material
* only. No warranty concerning this material or its use
* in any way whatsoever is expressed or implied.
*
* ===================================================================

FUNCTION OPTIONS(*DIRECT)
BEGIN_COM FORMPOSITION(ScreenCenter) HEIGHT(559) LAYOUTMANAGER(#ATLM_1) LEFT(225) MENUBAR(#MENUBAR1) TOP(144) WIDTH(698)
DEFINE_COM CLASS(#PRIM_MBAR) NAME(#MENUBAR1) PARENT(#COM_OWNER)
DEFINE_COM CLASS(#PRIM_ATLM) NAME(#ATLM_1)
DEFINE_COM CLASS(#PRIM_PANL) NAME(#TOOL_PAN) DISPLAYPOSITION(1) HEIGHT(30) LAYOUTMANAGER(#FWLM_1) LEFT(0) PARENT(#COM_OWNER) TABPOSITION(1) TABSTOP(False) TOP(0) VISUALSTYLE(#VS_TOOL) WIDTH(690)
DEFINE_COM CLASS(#PRIM_ATLI) NAME(#ATLI_1) ATTACHMENT(Top) MANAGE(#TOOL_PAN) PARENT(#ATLM_1)
DEFINE_COM CLASS(#PRIM_PANL) NAME(#OBJECT_PAN) DISPLAYPOSITION(2) HEIGHT(30) LEFT(0) PARENT(#COM_OWNER) TABPOSITION(2) TABSTOP(False) TOP(30) VISUALSTYLE(#VS_TOOL) WIDTH(690)
DEFINE_COM CLASS(#PRIM_ATLI) NAME(#ATLI_2) ATTACHMENT(Top) MANAGE(#OBJECT_PAN) PARENT(#ATLM_1)
DEFINE_COM CLASS(#PRIM_PANL) NAME(#MAIN_PAN) DISPLAYPOSITION(3) HEIGHT(431) LAYOUTMANAGER(#ATLM_2) LEFT(0) PARENT(#COM_OWNER) TABPOSITION(3) TABSTOP(False) TOP(60) VISUALSTYLEOFPARENT(False) WIDTH(690)
DEFINE_COM CLASS(#PRIM_ATLI) NAME(#ATLI_4) ATTACHMENT(Center) MANAGE(#MAIN_PAN) PARENT(#ATLM_1)
DEFINE_COM CLASS(#PRIM_ATLM) NAME(#ATLM_2)
DEFINE_COM CLASS(#PRIM_PANL) NAME(#BODY_PAN) DISPLAYPOSITION(1) HEIGHT(431) LAYOUTMANAGER(#SPLM_1) LEFT(0) PARENT(#MAIN_PAN) TABPOSITION(1) TABSTOP(False) TOP(0) VISUALSTYLEOFPARENT(False) WIDTH(690)
DEFINE_COM CLASS(#PRIM_ATLI) NAME(#ATLI_5) ATTACHMENT(Center) MANAGE(#BODY_PAN) PARENT(#ATLM_2)
DEFINE_COM CLASS(#PRIM_SPLM) NAME(#SPLM_1) ORIENTATION(Vertical)
DEFINE_COM CLASS(#PRIM_PANL) NAME(#BROWSE_PAN) DISPLAYPOSITION(1) HEIGHT(431) LAYOUTMANAGER(#ATLM_3) LEFT(0) PARENT(#BODY_PAN) TABPOSITION(1) TABSTOP(False) TOP(0) VISUALSTYLE(#VS_TOOL) VISUALSTYLEOFPARENT(False) WIDTH(241)
DEFINE_COM CLASS(#PRIM_PANL) NAME(#DETAIL_PAN) DISPLAYPOSITION(2) HEIGHT(431) LAYOUTMANAGER(#ATLM_4) LEFT(245) PARENT(#BODY_PAN) TABPOSITION(2) TABSTOP(False) TOP(0) VISUALSTYLE(#VS_TOOL) VISUALSTYLEOFPARENT(False) WIDTH(445)
DEFINE_COM CLASS(#PRIM_SPLI) NAME(#SPLI_1) MANAGE(#BROWSE_PAN) PARENT(#SPLM_1) WEIGHT(2)
DEFINE_COM CLASS(#PRIM_SPLI) NAME(#SPLI_2) MANAGE(#DETAIL_PAN) PARENT(#SPLM_1) WEIGHT(1)
DEFINE_COM CLASS(#PRIM_ATLM) NAME(#ATLM_3)
DEFINE_COM CLASS(#PRIM_ATLM) NAME(#ATLM_4)
DEFINE_COM CLASS(#PRIM_ATLI) NAME(#ATLI_6) ATTACHMENT(Left) PARENT(#ATLM_3)
DEFINE_COM CLASS(#PRIM_MITM) NAME(#MITM_OPTIONS) CAPTION('Options') DISPLAYPOSITION(4) PARENT(#MENUBAR1)
DEFINE_COM CLASS(#PRIM_SMNU) NAME(#SMNU_1) PARENT(#MITM_OPTIONS)
DEFINE_COM CLASS(#PRIM_MITM) NAME(#MITM_DATE) CAPTION('Date') CHECKED(True) DISPLAYPOSITION(1) PARENT(#SMNU_1)
DEFINE_COM CLASS(#PRIM_MITM) NAME(#MITM_TIME) CAPTION('Time') CHECKED(True) DISPLAYPOSITION(2) PARENT(#SMNU_1)
DEFINE_COM CLASS(#PRIM_MITM) NAME(#MITM_5) CAPTION('Layout Style') DISPLAYPOSITION(3) PARENT(#SMNU_1)
DEFINE_COM CLASS(#PRIM_SMNU) NAME(#SMNU_2) PARENT(#MITM_5)
DEFINE_COM CLASS(#PRIM_MITM) NAME(#MITM_LAYOUTLEFT) CAPTION('Left') DISPLAYPOSITION(1) PARENT(#SMNU_2)
DEFINE_COM CLASS(#PRIM_MITM) NAME(#MITM_LAYOUTRIGHT) CAPTION('Right') DISPLAYPOSITION(2) PARENT(#SMNU_2)
DEFINE_COM CLASS(#PRIM_MITM) NAME(#MITM_LAYOUTABOVE) CAPTION('Above') DISPLAYPOSITION(3) PARENT(#SMNU_2)
DEFINE_COM CLASS(#PRIM_MITM) NAME(#MITM_LAYOUTBELOW) CAPTION('Below') DISPLAYPOSITION(4) PARENT(#SMNU_2)
DEFINE_COM CLASS(#PRIM_LABL) NAME(#F_OBJECT) CAPTION('Current Object Identifier ') DISPLAYPOSITION(1) HEIGHT(18) LEFT(4) PARENT(#OBJECT_PAN) TABPOSITION(1) TABSTOP(False) TOP(2) VISUALSTYLE(#VS_LARGE) WIDTH(683)
DEFINE_COM CLASS(#PRIM_FWLM) NAME(#FWLM_1) FLOWOPERATIONVER(Center) MARGINBOTTOM(2) MARGINLEFT(2) MARGINRIGHT(2) MARGINTOP(2) SPACING(0) SPACINGITEMS(0)
DEFINE_COM CLASS(#PRIM_MITM) NAME(#MITM_ATTOP) CAPTION('At Top') DISPLAYPOSITION(4) PARENT(#SMNU_1)
DEFINE_COM CLASS(#PRIM_SMNU) NAME(#SMNU_3) PARENT(#MITM_ATTOP)
DEFINE_COM CLASS(#PRIM_MITM) NAME(#MITM_TOPTOOLBAR) CAPTION('Tool Bar') DISPLAYPOSITION(1) PARENT(#SMNU_3)
DEFINE_COM CLASS(#PRIM_MITM) NAME(#MITM_TOPOBJECTID) CAPTION('Object Identification') DISPLAYPOSITION(2) PARENT(#SMNU_3)
DEFINE_COM CLASS(#PRIM_MITM) NAME(#MITM_SHOWTOOL) CAPTION('Show Tool Bar') CHECKED(True) DISPLAYPOSITION(5) PARENT(#SMNU_1)
DEFINE_COM CLASS(#PRIM_MITM) NAME(#MITM_SHOWOBJECT) CAPTION('Show Object Identification') CHECKED(True) DISPLAYPOSITION(6) PARENT(#SMNU_1)

DEFINE_COM CLASS(#PRIM_MITM) NAME(#MITM_HELP) CAPTION('Help') DISPLAYPOSITION(5) PARENT(#MENUBAR1)
DEFINE_COM CLASS(#PRIM_SMNU) NAME(#SMNU_4) PARENT(#MITM_HELP)
DEFINE_COM CLASS(#PRIM_MITM) NAME(#MITM_ABOUTHELP) CAPTION('&About') DISPLAYPOSITION(2) PARENT(#SMNU_4)
DEFINE_COM CLASS(#PRIM_MITM) NAME(#MITM_GENERALHELP) CAPTION('&Contents and Index') DISPLAYPOSITION(1) PARENT(#SMNU_4)

DEFINE_COM CLASS(#S_155FLG) NAME(#LOGO)
DEFINE_COM CLASS(#S_155FHL) NAME(#ABOUT)
DEFINE_COM CLASS(#PRIM_ATLI) NAME(#ATLI_7) ATTACHMENT(Center) PARENT(#ATLM_3)
DEFINE_COM CLASS(#PRIM_LABL) NAME(#LABL_1) ALIGNMENT(Center) CAPTION('Browser Panel Area') DISPLAYPOSITION(1) HEIGHT(41) LEFT(0) PARENT(#BROWSE_PAN) TABPOSITION(1) TABSTOP(False) TOP(0) VISUALSTYLE(#VS_EMPH) WIDTH(237)
DEFINE_COM CLASS(#PRIM_ATLI) NAME(#ATLI_8) ATTACHMENT(Top) MANAGE(#LABL_1) PARENT(#ATLM_3)
DEFINE_COM CLASS(#PRIM_LABL) NAME(#LABL_2) ALIGNMENT(Center) CAPTION('Detailer Panel Area ') DISPLAYPOSITION(1) HEIGHT(41) LEFT(0) PARENT(#DETAIL_PAN) TABPOSITION(1) TABSTOP(False) TOP(0) VISUALSTYLE(#VS_EMPH) WIDTH(441)
DEFINE_COM CLASS(#PRIM_ATLI) NAME(#ATLI_9) ATTACHMENT(Top) MANAGE(#LABL_2) PARENT(#ATLM_4)
DEFINE_COM CLASS(#PRIM_ATLI) NAME(#ATLI_10) ATTACHMENT(Bottom) PARENT(#ATLM_1)
DEFINE_COM CLASS(#PRIM_ATLI) NAME(#ATLI_3) ATTACHMENT(Bottom) PARENT(#ATLM_1)
DEFINE_COM CLASS(#PRIM_FWLM) NAME(#FWLM_2) DIRECTION(BottomToTop) FLOWOPERATION(Center) FLOWOPERATIONVER(Spread)
DEFINE_COM CLASS(#PRIM_FWLI) NAME(#FWLI_4) PARENT(#FWLM_2)
DEFINE_COM CLASS(#PRIM_FWLI) NAME(#FWLI_5) PARENT(#FWLM_2)
DEFINE_COM CLASS(#PRIM_STBR) NAME(#STBR_1) DISPLAYPOSITION(4) HEIGHT(22) LEFT(0) MESSAGEPOSITION(1) PARENT(#COM_OWNER) TABPOSITION(4) TABSTOP(False) TOP(491) WIDTH(690)
DEFINE_COM CLASS(#PRIM_ATLI) NAME(#ATLI_11) ATTACHMENT(Bottom) MANAGE(#STBR_1) PARENT(#ATLM_1)
DEFINE_COM CLASS(#S_155RST) NAME(#INFOBAR) LEFT(270) PARENT(#STBR_1) TABSTOP(False) TOP(4) WIDTH(401)


DEFINE_COM CLASS(#PRIM_SPBN) NAME(#TOOL_BUTTON_01) DISPLAYPOSITION(1) HEIGHT(22) IMAGE(#VB_OPEN) LEFT(2) PARENT(#TOOL_PAN) TABPOSITION(8) TOP(2) WIDTH(22)
DEFINE_COM CLASS(#PRIM_FWLI) NAME(#FWLI_01) MANAGE(#TOOL_BUTTON_01) PARENT(#FWLM_1)
DEFINE_COM CLASS(#PRIM_SPBN) NAME(#TOOL_BUTTON_02) DISPLAYPOSITION(2) HEIGHT(22) IMAGE(#VB_OPEN) LEFT(24) PARENT(#TOOL_PAN) TABPOSITION(9) TOP(2) WIDTH(22)
DEFINE_COM CLASS(#PRIM_FWLI) NAME(#FWLI_02) MANAGE(#TOOL_BUTTON_02) PARENT(#FWLM_1)
DEFINE_COM CLASS(#PRIM_SPBN) NAME(#TOOL_BUTTON_03) DISPLAYPOSITION(3) HEIGHT(22) IMAGE(#VB_OPEN) LEFT(46) PARENT(#TOOL_PAN) TABPOSITION(10) TOP(2) WIDTH(22)
DEFINE_COM CLASS(#PRIM_FWLI) NAME(#FWLI_03) MANAGE(#TOOL_BUTTON_03) PARENT(#FWLM_1)
DEFINE_COM CLASS(#PRIM_SPBN) NAME(#TOOL_BUTTON_04) DISPLAYPOSITION(4) HEIGHT(22) IMAGE(#VB_OPEN) LEFT(68) PARENT(#TOOL_PAN) TABPOSITION(7) TOP(2) WIDTH(22)
DEFINE_COM CLASS(#PRIM_FWLI) NAME(#FWLI_04) MANAGE(#TOOL_BUTTON_04) PARENT(#FWLM_1)
DEFINE_COM CLASS(#PRIM_SPBN) NAME(#TOOL_BUTTON_05) DISPLAYPOSITION(5) HEIGHT(22) IMAGE(#VB_OPEN) LEFT(90) PARENT(#TOOL_PAN) TABPOSITION(6) TOP(2) WIDTH(22)
DEFINE_COM CLASS(#PRIM_FWLI) NAME(#FWLI_05) MANAGE(#TOOL_BUTTON_05) PARENT(#FWLM_1)
DEFINE_COM CLASS(#PRIM_SPBN) NAME(#TOOL_BUTTON_06) DISPLAYPOSITION(6) HEIGHT(22) IMAGE(#VB_OPEN) LEFT(112) PARENT(#TOOL_PAN) TABPOSITION(5) TOP(2) WIDTH(22)
DEFINE_COM CLASS(#PRIM_FWLI) NAME(#FWLI_06) MANAGE(#TOOL_BUTTON_06) PARENT(#FWLM_1)
DEFINE_COM CLASS(#PRIM_SPBN) NAME(#TOOL_BUTTON_07) DISPLAYPOSITION(7) HEIGHT(22) IMAGE(#VB_OPEN) LEFT(134) PARENT(#TOOL_PAN) TABPOSITION(4) TOP(2) WIDTH(22)
DEFINE_COM CLASS(#PRIM_FWLI) NAME(#FWLI_07) MANAGE(#TOOL_BUTTON_07) PARENT(#FWLM_1)
DEFINE_COM CLASS(#PRIM_SPBN) NAME(#TOOL_BUTTON_08) DISPLAYPOSITION(8) HEIGHT(22) IMAGE(#VB_OPEN) LEFT(156) PARENT(#TOOL_PAN) TABPOSITION(3) TOP(2) WIDTH(22)
DEFINE_COM CLASS(#PRIM_FWLI) NAME(#FWLI_08) MANAGE(#TOOL_BUTTON_08) PARENT(#FWLM_1)
DEFINE_COM CLASS(#PRIM_SPBN) NAME(#TOOL_BUTTON_09) DISPLAYPOSITION(9) HEIGHT(22) IMAGE(#VB_OPEN) LEFT(178) PARENT(#TOOL_PAN) TABPOSITION(2) TOP(2) WIDTH(22)
DEFINE_COM CLASS(#PRIM_FWLI) NAME(#FWLI_09) MANAGE(#TOOL_BUTTON_09) PARENT(#FWLM_1)
DEFINE_COM CLASS(#PRIM_SPBN) NAME(#TOOL_BUTTON_10) DISPLAYPOSITION(10) HEIGHT(22) IMAGE(#VB_OPEN) LEFT(200) PARENT(#TOOL_PAN) TABPOSITION(1) TOP(2) WIDTH(22)
DEFINE_COM CLASS(#PRIM_FWLI) NAME(#FWLI_10) MANAGE(#TOOL_BUTTON_10) PARENT(#FWLM_1)


DEFINE_COM CLASS(#PRIM_MITM) NAME(#MITM_OBJECTA) CAPTION('A Options') DISPLAYPOSITION(1) PARENT(#MENUBAR1)
DEFINE_COM CLASS(#PRIM_SMNU) NAME(#OBJECTA) PARENT(#MITM_OBJECTA)
DEFINE_COM CLASS(#PRIM_MITM) NAME(#MITM_OBJECTA_ITEM_01) CAPTION('Spare Item 1') DISPLAYPOSITION(1) PARENT(#OBJECTA)
DEFINE_COM CLASS(#PRIM_MITM) NAME(#MITM_OBJECTA_ITEM_02) CAPTION('Spare Item 2') DISPLAYPOSITION(2) PARENT(#OBJECTA)
DEFINE_COM CLASS(#PRIM_MITM) NAME(#MITM_OBJECTA_ITEM_03) CAPTION('Spare Item 3') DISPLAYPOSITION(3) PARENT(#OBJECTA)
DEFINE_COM CLASS(#PRIM_MITM) NAME(#MITM_OBJECTA_ITEM_04) CAPTION('Spare Item 4') DISPLAYPOSITION(4) PARENT(#OBJECTA)
DEFINE_COM CLASS(#PRIM_MITM) NAME(#MITM_OBJECTA_ITEM_05) CAPTION('Spare Item 5') DISPLAYPOSITION(5) PARENT(#OBJECTA)
DEFINE_COM CLASS(#PRIM_MITM) NAME(#MITM_OBJECTA_ITEM_06) CAPTION('Spare Item 6') DISPLAYPOSITION(6) PARENT(#OBJECTA)
DEFINE_COM CLASS(#PRIM_MITM) NAME(#MITM_OBJECTA_ITEM_07) CAPTION('Spare Item 7') DISPLAYPOSITION(7) PARENT(#OBJECTA)
DEFINE_COM CLASS(#PRIM_MITM) NAME(#MITM_OBJECTA_ITEM_08) CAPTION('Spare Item 9') DISPLAYPOSITION(8) PARENT(#OBJECTA)
DEFINE_COM CLASS(#PRIM_MITM) NAME(#MITM_OBJECTA_ITEM_09) CAPTION('Spare Item 9') DISPLAYPOSITION(9) PARENT(#OBJECTA)
DEFINE_COM CLASS(#PRIM_MITM) NAME(#MITM_OBJECTA_ITEM_10) CAPTION('Spare Item 10') DISPLAYPOSITION(10) PARENT(#OBJECTA)


DEFINE_COM CLASS(#PRIM_MITM) NAME(#MITM_OBJECTB) CAPTION('B Options') DISPLAYPOSITION(2) PARENT(#MENUBAR1)
DEFINE_COM CLASS(#PRIM_SMNU) NAME(#OBJECTB) PARENT(#MITM_OBJECTB)
DEFINE_COM CLASS(#PRIM_MITM) NAME(#MITM_OBJECTB_ITEM_01) CAPTION('Spare Item 1') DISPLAYPOSITION(1) PARENT(#OBJECTB)
DEFINE_COM CLASS(#PRIM_MITM) NAME(#MITM_OBJECTB_ITEM_02) CAPTION('Spare Item 2') DISPLAYPOSITION(2) PARENT(#OBJECTB)
DEFINE_COM CLASS(#PRIM_MITM) NAME(#MITM_OBJECTB_ITEM_03) CAPTION('Spare Item 3') DISPLAYPOSITION(3) PARENT(#OBJECTB)
DEFINE_COM CLASS(#PRIM_MITM) NAME(#MITM_OBJECTB_ITEM_04) CAPTION('Spare Item 4') DISPLAYPOSITION(4) PARENT(#OBJECTB)
DEFINE_COM CLASS(#PRIM_MITM) NAME(#MITM_OBJECTB_ITEM_05) CAPTION('Spare Item 5') DISPLAYPOSITION(5) PARENT(#OBJECTB)
DEFINE_COM CLASS(#PRIM_MITM) NAME(#MITM_OBJECTB_ITEM_06) CAPTION('Spare Item 6') DISPLAYPOSITION(6) PARENT(#OBJECTB)
DEFINE_COM CLASS(#PRIM_MITM) NAME(#MITM_OBJECTB_ITEM_07) CAPTION('Spare Item 7') DISPLAYPOSITION(7) PARENT(#OBJECTB)
DEFINE_COM CLASS(#PRIM_MITM) NAME(#MITM_OBJECTB_ITEM_08) CAPTION('Spare Item 8') DISPLAYPOSITION(8) PARENT(#OBJECTB)
DEFINE_COM CLASS(#PRIM_MITM) NAME(#MITM_OBJECTB_ITEM_09) CAPTION('Spare Item 9') DISPLAYPOSITION(9) PARENT(#OBJECTB)
DEFINE_COM CLASS(#PRIM_MITM) NAME(#MITM_OBJECTB_ITEM_10) CAPTION('Spare Item 10') DISPLAYPOSITION(10) PARENT(#OBJECTB)

DEFINE_COM CLASS(#PRIM_MITM) NAME(#MITM_OBJECTC) CAPTION('C Options') DISPLAYPOSITION(3) PARENT(#MENUBAR1)
DEFINE_COM CLASS(#PRIM_SMNU) NAME(#OBJECTC) PARENT(#MITM_OBJECTC)
DEFINE_COM CLASS(#PRIM_MITM) NAME(#MITM_OBJECTC_ITEM_01) CAPTION('Spare Item 1') DISPLAYPOSITION(1) PARENT(#OBJECTC)
DEFINE_COM CLASS(#PRIM_MITM) NAME(#MITM_OBJECTC_ITEM_02) CAPTION('Spare Item 2') DISPLAYPOSITION(2) PARENT(#OBJECTC)
DEFINE_COM CLASS(#PRIM_MITM) NAME(#MITM_OBJECTC_ITEM_03) CAPTION('Spare Item 3') DISPLAYPOSITION(3) PARENT(#OBJECTC)
DEFINE_COM CLASS(#PRIM_MITM) NAME(#MITM_OBJECTC_ITEM_04) CAPTION('Spare Item 4') DISPLAYPOSITION(4) PARENT(#OBJECTC)
DEFINE_COM CLASS(#PRIM_MITM) NAME(#MITM_OBJECTC_ITEM_05) CAPTION('Spare Item 5') DISPLAYPOSITION(5) PARENT(#OBJECTC)
DEFINE_COM CLASS(#PRIM_MITM) NAME(#MITM_OBJECTC_ITEM_06) CAPTION('Spare Item 6') DISPLAYPOSITION(6) PARENT(#OBJECTC)
DEFINE_COM CLASS(#PRIM_MITM) NAME(#MITM_OBJECTC_ITEM_07) CAPTION('Spare Item 7') DISPLAYPOSITION(7) PARENT(#OBJECTC)
DEFINE_COM CLASS(#PRIM_MITM) NAME(#MITM_OBJECTC_ITEM_08) CAPTION('Spare Item 8') DISPLAYPOSITION(8) PARENT(#OBJECTC)
DEFINE_COM CLASS(#PRIM_MITM) NAME(#MITM_OBJECTC_ITEM_09) CAPTION('Spare Item 9') DISPLAYPOSITION(9) PARENT(#OBJECTC)
DEFINE_COM CLASS(#PRIM_MITM) NAME(#MITM_OBJECTC_ITEM_10) CAPTION('Spare Item 10') DISPLAYPOSITION(11) PARENT(#OBJECTB)


* Definitional fields

Define #Use_Logo RefFld(#Std_Texts) default('lansa2.bmp') desc('Logo to be shown')
Define #F_Height RefFld(#Std_Num)
Define #F_Width RefFld(#Std_Num)
Define #F_Top RefFld(#Std_Num)
Define #F_Left RefFld(#Std_Num)
Define #F_LayOut RefFld(#Std_CodeL)

* Temporary work Fields

Define #TmpChar20 *char 20

* ==============================
* Handle Form Instance Creations
* ==============================

EvtRoutine Handling(#Com_Owner.CreateInstance)

* Restore size details and layout pan and initialize from them

Change #F_Height #Com_Owner.Height
Change #F_Width #Com_Owner.Width
Change #F_Top #Com_Owner.Top
Change #F_Left #Com_Owner.Left
Change #F_LayOut LEFT
Change (#F_LayOut #F_Height #F_Width #F_Top #F_Left) *remembered_value_for_user

Set #Com_Owner Height(#F_Height) Width(#F_Width) Top(#F_Top) Left(#F_Left)

Invoke #Com_Owner.ImplementLayout Plan(#F_LayOut)

EndRoutine

* ==========================
* Handle Form Initialization
* ==========================

Evtroutine handling(#Com_Owner.Initialize) OPTIONS(*NOCLEARMESSAGES *NOCLEARERRORS)

* Set the status bar nto a busy state

Set #InfoBar uBusy(True)

* Put up the requested start up logo

Set #Logo uFileName(#Use_Logo)
Invoke #Logo.uShow

* Do example initialization tasks split into approximate
* 10% units. Note that Begin_loop / End_Loops are included
* to slow the application down and they need to be removed
*

Set #InfoBar uPercentageComplete(10) uStatusText('Initialize 1') uStatusNumber(1)
Message 'Form initialization step 1 in progress. Please wait.' type(*status)
Begin_loop from(1) to(1000000)
End_Loop

Set #InfoBar uPercentageComplete(20) uStatusText('Initialize 2') uStatusNumber(2)
Message 'Form initialization step 2 in progress. Please wait.' type(*status)
Begin_loop from(1) to(5000000)
End_Loop

Set #InfoBar uPercentageComplete(30) uStatusText('Initialize 3') uStatusNumber(3)
Message 'Form initialization step 3 in progress. Please wait.' type(*status)
Begin_loop from(1) to(5000000)
End_Loop

Set #InfoBar uPercentageComplete(40) uStatusText('Initialize 4') uStatusNumber(4)
Message 'Form initialization step 4 in progress. Please wait.' type(*status)
Begin_loop from(1) to(5000000)
End_Loop

Set #InfoBar uPercentageComplete(50) uStatusText('Initialize 5') uStatusNumber(5)
Message 'Form initialization step 5 in progress. Please wait.' type(*status)
Begin_loop from(1) to(5000000)
End_Loop

Set #InfoBar uPercentageComplete(60) uStatusText('Initialize 6') uStatusNumber(6)
Message 'Form initialization step 6 in progress. Please wait.' type(*status)
Begin_loop from(1) to(5000000)
End_Loop

Set #InfoBar uPercentageComplete(70) uStatusText('Initialize 7') uStatusNumber(7)
Message 'Form initialization step 7 in progress. Please wait.' type(*status)
Begin_loop from(1) to(5000000)
End_Loop

Set #InfoBar uPercentageComplete(80) uStatusText('Initialize 8') uStatusNumber(8)
Message 'Form initialization step 8 in progress. Please wait.' type(*status)
Begin_loop from(1) to(5000000)
End_Loop

Set #InfoBar uPercentageComplete(90) uStatusText('Initialize 9') uStatusNumber(9)
Message 'Form initialization step 9 in progress. Please wait.' type(*status)
Begin_loop from(1) to(5000000)
End_Loop

Set #InfoBar uPercentageComplete(100) uStatusText('Initialize 10') uStatusNumber(10)
Message 'Form initialization step 10 in progress. Please wait.' type(*status)
Begin_loop from(1) to(5000000)
End_Loop

* Close the logo

Invoke #Logo.uClose

* Go into ready state

Set #InfoBar uStatusNumber(0) uBusy(False)

* Initialization is now complete

EndRoutine

* ==================
* Handle Date On/Off
* ==================

EVTROUTINE HANDLING(#MItm_Date.Click) OPTIONS(*NOCLEARMESSAGES *NOCLEARERRORS)
Def_Cond *Not_Date '#MItm_Date.Checked *ne True'
Set #MItm_Date Checked(*Not_Date)
Set #InfoBar uShowDate(#MItm_Date.Checked)
ENDROUTINE

* ===================
* Handle Time End/Off
* ===================

EVTROUTINE HANDLING(#MItm_Time.Click) OPTIONS(*NOCLEARMESSAGES *NOCLEARERRORS)
Def_Cond *Not_Time '#MItm_Time.Checked *ne True'
Set #MItm_Time Checked(*Not_Time)
Set #InfoBar uShowTime(#MItm_Time.Checked)
ENDROUTINE

* ================================
* Handle help text display options
* ================================

EVTROUTINE HANDLING(#MItm_GeneralHelp.Click)
use builtin(show_help) with_args(DF *component *blanks)
ENDROUTINE

* ============================
* Handle about display options
* ============================

EVTROUTINE HANDLING(#MItm_AboutHelp.Click)
Invoke #About.uShow
ENDROUTINE

* =====================================
* Handle Layout plan changes / requests
* =====================================

EvtRoutine Handling(#MItm_LayOutLeft.Click) OPTIONS(*NOCLEARMESSAGES *NOCLEARERRORS)
Invoke #Com_Owner.ImplementLayout Plan(LEFT)
EndRoutine

EvtRoutine Handling(#MItm_LayOutRight.Click) OPTIONS(*NOCLEARMESSAGES *NOCLEARERRORS)
Invoke #Com_Owner.ImplementLayout Plan(RIGHT)
EndRoutine

EvtRoutine Handling(#MItm_LayOutAbove.Click) OPTIONS(*NOCLEARMESSAGES *NOCLEARERRORS)
Invoke #Com_Owner.ImplementLayout Plan(ABOVE)
EndRoutine

EvtRoutine Handling(#MItm_LayOutBelow.Click) OPTIONS(*NOCLEARMESSAGES *NOCLEARERRORS)
Invoke #Com_Owner.ImplementLayout Plan(BELOW)
EndRoutine

* Implement a Layout Plan

MthRoutine ImplementLayout
Define_Map *Input #Std_CodeL #Plan

Change #F_LayOut #Plan.Value

Set (#MItm_LayOutLeft #MItm_LayOutRight #MItm_LayOutAbove #MItm_LayOutBelow) Checked(False)

Case #F_LayOut
When '= Right'
Set #MItm_LayOutRight Checked(True)
Set #SplM_1 Orientation(Vertical)
Set #Detail_Pan DisplayPosition(1)
When '= Above'
Set #MItm_LayOutAbove Checked(True)
Set #SplM_1 Orientation(Horizontal)
Set #Browse_Pan DisplayPosition(1)
When '= Below'
Set #MItm_LayOutBelow Checked(True)
Set #SplM_1 Orientation(Horizontal)
Set #Detail_Pan DisplayPosition(1)
OtherWise
Change #F_LayOut LEFT
Set #MItm_LayOutLeft Checked(True)
Set #SplM_1 Orientation(Vertical)
Set #Browse_Pan DisplayPosition(1)
EndCase

Invoke #Detail_Pan.UpdateDisplay
Invoke #Browse_Pan.UpdateDisplay

EndRoutine

* ======================
* Handle Tool Bar At Top
* ======================

EvtRoutine Handling(#MItm_TopToolBar.Click) OPTIONS(*NOCLEARMESSAGES *NOCLEARERRORS)
Set #Object_Pan DisplayPosition(2)
Set #Tool_Pan DisplayPosition(1)
Set #MItm_TopObjectId Checked(False)
Set #MItm_TopToolBar Checked(True)
EndRoutine

* =======================
* Handle Object Id at Top
* =======================

EvtRoutine Handling(#MItm_TopObjectId.Click) OPTIONS(*NOCLEARMESSAGES *NOCLEARERRORS)
Set #Tool_Pan DisplayPosition(2)
Set #Object_Pan DisplayPosition(1)
Set #MItm_TopObjectId Checked(True)
Set #MItm_TopToolBar Checked(False)
EndRoutine

* =======================
* Handle Showing Tool Bar
* =======================

EvtRoutine Handling(#MItm_ShowTool.Click) OPTIONS(*NOCLEARMESSAGES *NOCLEARERRORS)
If '#MItm_ShowTool.Checked = True'
Set #MItm_ShowTool Checked(False)
Set #Tool_Pan Visible(False)
Else
Set #MItm_ShowTool Checked(True)
Set #Tool_Pan Visible(True)
Endif
EndRoutine

* ========================
* Handle Showing Object Id
* ========================

EvtRoutine Handling(#MItm_ShowObject.Click) OPTIONS(*NOCLEARMESSAGES *NOCLEARERRORS)
If '#MItm_ShowObject.Checked = True'
Set #MItm_ShowObject Checked(False)
Set #Object_Pan Visible(False)
Else
Set #MItm_ShowObject Checked(True)
Set #Object_Pan Visible(True)
Endif
EndRoutine

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

EvtRoutine Handling(#Com_Owner.Closing)

* Remember size and location details (if in a normal state)

If '#Com_Owner.WindowState = Normal'
Change #F_Height #Com_Owner.Height
Change #F_Width #Com_Owner.Width
Change #F_Top #Com_Owner.Top
Change #F_Left #Com_Owner.Left
Endif

EndRoutine

END_COM