Contents of iListCellDesign disappear upon scrolling

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
Mkolbe
Posts: 27
Joined: Tue Apr 04, 2017 12:45 am

Contents of iListCellDesign disappear upon scrolling

Post by Mkolbe »

I'm using a couple different iListCellDesign reusable parts within an expandable list. I'm using one to change color of a cell when its value is less than 0.
This seems to work as desired. However, for the other iListCellDesign cell, I'm merely defining the contents of the cell (an item number) as a label, so that the user can copy the contents of the cell (with CTRL/C).

When my list initially displays, every thing looks good, all the cells show the item number as expected (and I can copy).
However, in cases when my list is larger than the display allows, and I then scroll down, the contents of the item number iListCellDesign cells in the list disappear temporarily. When I hover my mouse back over those cells, the item number value/label reappears.

I thought my issue had something to do with "realizing" my list item, but that either is not the issue, or I don't know how to implement that.
reusable part cell contents - after initial load.png
reusable part cell contents - after initial load.png (102.89 KiB) Viewed 22501 times
reusable part cell contents disappear.png
reusable part cell contents disappear.png (88.38 KiB) Viewed 22501 times
REUSABLE PART CONTAINING MY LIST

Code: Select all

* List that displays children (component items) of a parent item
Define_Com Class(#PRIM_List) Name(#ChildList) Displayposition(4) Height(400) Left(0) Parent(#COM_OWNER) Tabposition(4) Top(48) Width(940) Columnlines(False) Rowlines(False)
Define_Com Class(#PRIM_LIST.Part) Name(#ColumnChild) Displayposition(1) Parent(#ChildList) Columnwidth(190) Columncaption('Item') Design(#[b]FC_RP_Cell_Item[/b]) Cellheight(25) Cellwidth(190)
Define_Com Class(#PRIM_LIST.String) Name(#ColumnCompDesc) Displayposition(2) Parent(#ChildList) Source(#PDES35) Columnwidth(300) Columncaption('Description') Columncaptiontype(Caption)
Define_Com Class(#PRIM_LIST.String) Name(#ColumnCompPITP) Displayposition(3) Parent(#ChildList) Source(#PITP04) Columnwidth(80) Columncaption('Item Type') Columncaptiontype(Caption)
Define_Com Class(#PRIM_LIST.String) Name(#ColumnCompPSTR) Displayposition(4) Parent(#ChildList) Source(#PSTR04) Columnwidth(90) Columncaption('Primary Stkr') Columncaptiontype(Caption)
Define_Com Class(#PRIM_LIST.Number) Name(#ColumnChildQty) Displayposition(5) Parent(#ChildList) Source(#QPER28) Columnwidth(90) Columncaption('Qty Per') Columncaptiontype(Caption) Displayalignment(Right)
Define_Com Class(#PRIM_LIST.Part) Name(#ColumnChildAvail) Displayposition(6) Parent(#ChildList) Columnwidth(90) Columncaption('Qty Available') Design(#FC_RP_Cell_Qty_Available) Cellheight(25) Cellwidth(90)

* Get children of the item
Mthroutine Name(AddChildren)
Define_Map For(*INPUT) Class(#PRIM_List.ListItem) Name(#ParentItem) Mandatory(*Null) Pass(*BY_REFERENCE)

#Getchildren.Execute Cono28(#cono35) Prnt28(#ItemNumber) Msp28list_Ext(#MSP28List_Ext)

Selectlist Named(#MSP28List_Ext)

Add_Entry To_List(#ChildList)
#ChildList.CurrentItem.ParentItem <= #ParentItem
* If the item has components, set the row expand flag
If Cond(#STD_ALPHA *EQ 'Y')
#ChildList.CurrentItem.HasChildren := Yes
Else
#ChildList.CurrentItem.HasChildren := No
Endif

* Trying to get item number reusable part contents to not disappear
#ChildList.Realize

Endselect

Endroutine
ILISTCELLDESIGN REUSABLE PART (#FC_RP_CELL_ITEM)

Code: Select all

Begin_Com Role(*EXTENDS #PRIM_PANL *implements #Prim_List.iListCellDesign *ListFields #ListFields) Displayposition(1) Height(90) Left(0) Tabposition(1) Top(0) Width(120)

Define_Com Class(#PRIM_LABL) Name(#Label1) Displayposition(1) Height(25) Left(0) Parent(#COM_OWNER) Tabposition(1) Tabstop(False) Top(0) Width(190) Selectable(True)
Group_By Name(#ListFields) Fields(#COMP28)

Mthroutine Name(OnAdd) Options(*REDEFINE)
#Label1 := #COMP28
* Attempt to get item number to display and not get lost upon scrolling.
#Label1.Realize
Endroutine

Mkolbe
Posts: 27
Joined: Tue Apr 04, 2017 12:45 am

Re: Contents of iListCellDesign disappear upon scrolling

Post by Mkolbe »

We applied the most recent EPC (EPC150050) on our test AS400 and this took care of my original issue.

However, it looks like this EPC introduced a different issue for us.....

Horizontal scroll bars are now appearing at the bottom of every List, even though the width of the list does not require horizontal scrolling.
In fact, if you attempt to use the scroll bar, it actually reduces the over size of the entire window.
Picture1.jpg
Picture1.jpg (62.47 KiB) Viewed 21439 times
Image 4.jpg
Image 4.jpg (103.3 KiB) Viewed 21439 times
Post Reply