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 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
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