Unit 'MUIClass.List' Package
[Overview][Types][Classes][Index] [#MUIClass]


Iterate through the selected entries of a list.


Source position: MUIClass.List.pas line 96

public procedure TMUIList.NextSelected(

  var Pos: Integer





A longword that will hold the number of the returned entry. Must be set to MUIV_List_NextSelected_Start at start of iteration. Is set to MUIV_List_NextSelected_End when iteration is finished.


This method steps through the contents of a (multi select) list and returns every entry that is currently selected. When no entry is selected but an entry is active, only the active entry will be returned.

This behaviour will result in not returning the active entry when you have some other selected entries somewhere in your list. Since the active entry just acts as some kind of cursor mark, this seems to be the only sensible possibility to handle multi selection together with keyboard control.


Pos := MUIV_List_NextSelected_Start; // Start Value
  List.NextSelected(Pos); // Get next Entry
  if Pos = MUIV_List_NextSelected_End then // Check for End of List
  Entry := List.GetEntry(Pos);
  // do something with your Entry
until False;

Documentation generated on: 2024-05-29