Author:
 Tracogna Roberto
Introduction

In DropDownListBoxes, the user can select the item in a list. You can fill the item list in many ways. In this example the user can select more items, the string items are added (comma separated) in the text area.

Using the code

Lunch the program, select items. Every time you select a new item the item dont'replace the previos selected item but is added to it.

Implementation
     
//Declare instance variable
Boolean b_itemChanging = FALSE


//In the itemchanged event of dw_1
IF dwo.Name = "ddlb_c1" THEN
	String r
	r = dw_1.GetItemString( row,LONG(dwo.ID), Primary!,False)
	IF ( NOT ISNULL(r) ) and data <> "" THEN
		IF r <> "" THEN	
			r = r + "," + data
		ELSE
			r= data
		END iF
		if not (b_itemChanging) then
			POST of_add(dw_1,Long(row), LONG(dwo.ID), r);
		else
			b_itemChanging = false
		end if
	END IF
	dw_1.SetColumn(LONG(dwo.ID) + 1)
END IF

//Implementation of add function
public subroutine of_add (datawindow arg_dw, long arg_row, long arg_col, string arg_string);b_itemChanging = true
	arg_dw.setitem(arg_row, arg_col, arg_string)
	b_itemChanging = false
end subroutine

Download Use this Download (PB9)