ItemDragDropData::GetListBoxItem
short GetListBoxItem (ULong index) const;
Parameters
- index
Index of the source list box item to get.
Return Value
Description
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 } }
Accessing listbox items from the drag source.