You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Show Contents List

Positioning Wrappers

Your form wrapper contains property #COM_OWNER.avWrapperAttachment.
By default, its value is CENTER, which means that the wrapper effectively replaces the 5250 screen:

However, you can alter its value in the wrapper's uInitialize method to TOP, BOTTOM, LEFT or RIGHT – indicating that the wrapper should display in that position relative to the 5250 screen.
Wrapper on the left:

 
Wrapper on the right:

 
Wrapper on the top:

 
Wrapper on the bottom:

Here's an example screen wrapper that moves around every time it is displayed:
Begin_Com Role(*EXTENDS #vf_ac038O) Height(65) Width(233) Layoutmanager(#Layout1)
Define_Com Class(#Prim_VS.style) Name(#Blue) Normbackcolor(0:99:177) Textcolor(White)
Define_Com Class(#PRIM_TBLO) Name(#Layout1)
Define_Com Class(#PRIM_TBLO.Row) Name(#Layout1Row1) Displayposition(1) Parent(#Layout1)
Define_Com Class(#PRIM_TBLO.Column) Name(#Layout1Column1) Displayposition(1) Parent(#Layout1)
Define_Com Class(#PRIM_TBLO.Item) Name(#Layout1Item1) Column(#Layout1Column1) Manage(#label1) Parent(#Layout1) Row(#Layout1Row1) Sizing(None)
Define_Com Class(#PRIM_LABL) Name(#label1) Parent(#COM_OWNER) Displayposition(1) Tabposition(1) Tabstop(False) Left(0) Top(20) Height(25) Width(233) Alignment(Center) Verticalalignment(Center)

  • -------------------------------------------------------------------------------------------
    Mthroutine Name(uInitialize) Options(*REDEFINE)
    #COM_ANCESTOR.uInitialize
    #COM_OWNER.Styles.add Style(#Blue)
    Endroutine
  • -------------------------------------------------------------------------------------------
    Mthroutine Name(SHOW_CURRENT_FORM) Options(*REDEFINE)
    Case (#Com_owner.avWrapperAttachment)
    When (= CENTER)
    #COM_OWNER.avWrapperAttachment := LEFT
    #Com_owner.width := 200
    When (= LEFT)
    #COM_OWNER.avWrapperAttachment := RIGHT
    #Com_owner.width := 200
    When (= RIGHT)
    #COM_OWNER.avWrapperAttachment := TOP
    #Com_owner.Height := 100
    When (= TOP)
    #COM_OWNER.avWrapperAttachment := BOTTOM
    #Com_owner.Height := 100
    When (= BOTTOM)
    #COM_OWNER.avWrapperAttachment := CENTER
    Endcase
    #label1.Caption := "Screen Wrapper - " + #COM_OWNER.avWrapperAttachment
    Endroutine
    End_Com   
     
    Show Contents List
  • No labels