Field Name
PROGRESS(Signed2,0)
Description
How to visualize a field as a ProgressBar on a form.
Create a field called PROGRESS which is signed and has a length of 2. Through the Field Component source remove the PRIM_EVEF visualization and add a ProgressBar visualization. Save the field and then use the visualization on a form.
Field Source
Begin_Com Role(*EXTENDS #PRIM_OBJT)
Begin_Com Role(*Visual #PRIM_EVPB) Name(#VisualProgress) Defaultvisual(True) Height(19) Width(209)
End_Com
End_Com
Form Source
Function Options(*DIRECT)
Begin_Com Role(*EXTENDS #PRIM_FORM) Clientheight(130) Clientwidth(492) Height(157) Left(304) Top(155)
Define_Com Class(#PROGRESS.Visual) Name(#PROGRESS) Displayposition(1) Height(57) Labelhoralignment(Center) Labelposition(Top) Left(112) Marginleft(0) Margintop(19) Parent(#COM_OWNER) Tabposition(1) Top(16) Width(233)
Define_Com Class(#PRIM_PHBN) Name(#PHBN_INC) Caption('Increment') Displayposition(2) Left(112) Parent(#COM_OWNER) Tabposition(2) Top(88)
Define_Com Class(#PRIM_PHBN) Name(#PHBN_DEC) Caption('Decrement') Displayposition(3) Left(264) Parent(#COM_OWNER) Tabposition(3) Top(88)
Evtroutine Handling(#PHBN_INC.Click)
Change Field(#STD_IDNO) To('#PROGRESS + 1')
Change Field(#PROGRESS) To(#STD_IDNO)
Endroutine
Evtroutine Handling(#PHBN_DEC.Click)
Change Field(#STD_IDNO) To('#PROGRESS - 1')
Change Field(#PROGRESS) To(#STD_IDNO)
Endroutine
End_Com
Appearance