Graphisoft®

Dialog ManagerVersion: 2.0

ItemDragDropData::GetListBoxSource

Gets the list box drag source if 'LBEX' drag format is present.

ListBox * GetListBoxSource (void) const;

Return Value

A DG::ListBox pointer to the listbox source of the drag and drop operation.

Description

Retrieves a list box type Dialog Manager item. This member function succeedes only if the source item a list box. You can check that by looking for the 'LBEX' drag format (or its modified version - ModifyBaseFormat) with the HasDragFormat function.

Example

// Method Example:
if (ev.HasDataFormat ('LBEX') || ev.HasDataFormat ('LBDR')) {
	DG::ListBox* sourceList = ev.GetListBoxSource ();			// Getting the source listbox control
	for (i = 0; i < ev.GetItemCount (); i++) {
		short listItem = ev.GetListBoxItem (i);
		ULong size = sourceList->GetTabItemTextLength (listItem, 1);
		text = BMAllocatePtr (size, ALLOCATE_CLEAR, 0);
		sourceList->GetTabItemText (listItem, 1, text, size);
		textArray.Insert (i + 1, text);							// Getting the text of the selected items
}

Description of the example.