&<img src="../resources/images/opentocr.png" title="Open Contents list" border="0"&>
You are here:
Example 1 - Simple Hosted Part
Create a reusable part called FLDVIS01 using the source following.  This is will provide autocompletion functionality for field DEPTMENT:
Function Options(*DIRECT)
Begin_Com Role(*EXTENDS #PRIM_PANL *implements #Prim_dc.iMonitorSubject) Defaultpty(Value) Displayposition(1) Height(20) Layoutmanager(#ATLM_1) Left(0) Tabposition(1) Top(0) Width(150)
Define_Com Class(#PRIM_ATLM) Name(#ATLM_1)
Define_Com Class(#DEPTMENT.VisualEdit) Name(#Department) Displayposition(1) Height(20) Marginleft(0) Parent(#COM_OWNER) Tabposition(1) Width(150)
Define_Com Class(#PRIM_ATLI) Name(#ATLI_1) Attachment(Center) Manage(#Department) Parent(#ATLM_1)
Define_Pty Name(Value) Get(GetPropertyValue) Set(SetPropertyValue)
Ptyroutine Name(GetPropertyValue)
Define_Map For(*Output) Class(#prim_alph) Name(#Property)
#Property := #Department
Endroutine
Ptyroutine Name(SetPropertyValue)
Define_Map For(*Input) Class(#prim_alph) Name(#Property)
#Department := #Property
Endroutine
Mthroutine Name(ApplymonitoredValue) Options(*redefine)