Weird formatting of integer values of LIST-ITEM-PAIRS combo-box

Keith G.

New Member
I recently ran across something weird with integer data type list-item-pairs combo-boxes. (The environment is Windows 10, OpenEdge 11.6.) I have found that the integer values in the string list found in the LIST-ITEM-PAIRS property are formatted with leading spaces.

So, when I assign a LIST-ITEM-PAIRS property with this string:
When I subsequently retrieve that property value, it looks like this:
"One|         1|Two|         2|Three|         3"
Each integer value list item is formatted to a width of 10 characters.

Has anyone else noticed this? Am I overlooking something that would be the cause?


Well-Known Member
The format determines how the values are formatted:

def var hw as handle.

create combo-box hw.
   hw:delimiter = '|'
   hw:list-item-pairs = 'one|1|two|2'

message hw:list-item-pairs view-as alert-box.

hw:format = '         9'.

message hw:list-item-pairs view-as alert-box.

Also beware that the format is a character format and not a number format.