Progress
Language Reference


ADD-FIRST( ) Method

Adds one or more items to the top of a combo box or selection list.

Return Type: LOGICAL

Applies To: Combo-box, Selection-list

SYNTAX
ADD-FIRST ( { item-list | label , value } ) 

item-list

A character-string expression that represents one or more items, delimiter-separated.

label

A character-string expression that represents the label of a label-value pair.

value

The value Progress assigns to the field or variable if the user selects the corresponding label.

The delimiter is the value of the DELIMITER attribute, which defaults to comma. If the SORT attribute is TRUE, Progress sorts new items by label before adding them to the widget. If the operation is successful, ADD-FIRST returns TRUE.

NOTE:

The following examples modify widgets whose entries consist of single items:

return-code = my-widget-hdl:ADD-FIRST("Seoul"). 

return-code = my-widget-hdl:ADD-FIRST("Bogota, Seoul, Los Angeles"). 

The following example modifies a combo-box widget of type INTEGER whose entries consist of label-value pairs:

return-code = my-widget-hdl:ADD-FIRST("Bogota", 15). 


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095