Highlighted
Super Contributor.
Super Contributor.
61 views

Populate Listbox with Table Data in WinForm

Jump to solution

I have the following table declared in my WinForm

 

01 TABLE-NUM OCCURS 5 TIMES.

 

How do I load TABLE-NUM into my ListBox?

For example, my Table has the following :

TABLE-NUM(1) = “1”

TABLE-NUM(2) = “2”

TABLE-NUM(3) = “3”

TABLE-NUM(4) = “4”

TABLE-NUM(5) = “5”

 

I want my List Box to display the Table data from which the user can select an entry as follows:

1

2

3

4

5

0 Likes
1 Solution

Accepted Solutions
Highlighted
Super Contributor.
Super Contributor.

I solved this as follows:


perform varying THE-IDX from 1 by 1
until THE-IDX > 5
move TABLE-NUM(THE-IDX) TO TMP-NUM
invoke lst-TABLE-NUM::Items::Add(TMP-NUM)
end-perform.

View solution in original post

0 Likes
1 Reply
Highlighted
Super Contributor.
Super Contributor.

I solved this as follows:


perform varying THE-IDX from 1 by 1
until THE-IDX > 5
move TABLE-NUM(THE-IDX) TO TMP-NUM
invoke lst-TABLE-NUM::Items::Add(TMP-NUM)
end-perform.

View solution in original post

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.