In VLF WIN environment

Visual LANSA Framework

In VLF.WIN environment

#avListManager.AddToList and UpdateListEntryData have a parameter, called RowColor which receives a string that must be:

1) blank / unspecified - leave the color as it is.

2) "DEFAULT" - set the color back to what it would normally be.

3) the name of a visual style that has been defined in the IDE, and that has been enrolled in the VLF (in your equivalent of UF_SYSTM).

To use this feature in Windows, you must first create a visual style for each color you want to use. You can copy from the base visual style used by your framework.  Edit the visual style's VALUE and set the normbackcolor to what you want:

Function Options(*DIRECT)

begin_com role(*EXTENDS #PRIM_VS) default(#SCHEME)

define_com class(#PRIM_VSS) name(#SCHEME) captions(#CAPTION) titles(#CAPTION) values(#VALUE)

define_com class(#PRIM_VSI) name(#CAPTION) facename('VL Shell') fontsize(8) normbackcolor(192:215:249) textcolor(MenuText)

define_com class(#PRIM_VSI) name(#VALUE) alternbackcolor(192:215:249) bordercolor(WindowText) borderstyle(3DLeft) errorbackcolor(192:215:249) facename('VL Shell') fontsize(8) normbackcolor(Red) textcolor(MenuText)

End_Com

 

(You could also change other properties of the VALUE if necessary)

Save the visual style and enrol it in the VLF by adding a line to your version of UF_SYSTM like this:

* ======================================================================

* This IIP method (avEnrollVisualStyles) enroll all framework user

* visual styles. To use this routine define the visual style into the LANSA

* repository in the usual manner and then add a new invocation of

* avEnrollVisualStyle to the following routine. If the visual style is

* subsequently changed only this component needs to be recompiled to

* effect the change into all other components.

 

Mthroutine Name(avEnrollVisualStyles) Options(*REDEFINE)

 

...

 

* Test Style with red background for highlighting instance list rows

Invoke Method(#Com_Owner.avEnrollVisualStyle) Style(#<<name of my red visual style>>) Caption('Base Style with red')

 

Endroutine

 

Compile your version of UF_SYSTM.

Now you can specify a row color when adding or updating instance list entries from a filter or command handler, like this:

Invoke #avListManager.AddtoList Visualid1(#UF_VisID1) Visualid2(#UF_VisID2) AKey1(#DEPTMENT) AKey2(#SECTION)  Akey3(#Empno) RowColor(<<name of my red visual style>>)

 

If you subsequently want to change that row back to its original color do this:

Invoke #avListManager.AddtoList Visualid1(#UF_VisID1) Visualid2(#UF_VisID2) AKey1(#DEPTMENT) AKey2(#SECTION)  Akey3(#Empno) RowColor(DEFAULT)

 

If you want to leave the color unchanged do not specify the RowColor:

Invoke #avListManager.AddtoList Visualid1(#UF_VisID1) Visualid2(#UF_VisID2) AKey1(#DEPTMENT) AKey2(#SECTION)  Akey3(#Empno)

 

or set it to *blanks:

Invoke #avListManager.AddtoList Visualid1(#UF_VisID1) Visualid2(#UF_VisID2) AKey1(#DEPTMENT) AKey2(#SECTION)  Akey3(#Empno) RowColor(*blanks)

 

Relationship Handler

Snap in Instance List