[SOLVED] Quick question about TListBox lazarus / 31-LCL ---------------------------------------------------------------------- SteveSS · 2019-12-17 16:56 Is it possible to process the items in a TListBox and do something with each one that has been selected by the user ... e.g. for i := 0 to listbox.items.count - 1 do begin   if listbox.items.selected = true then     do something ...... end; I know that .selected is not available but can't find any way of identifying which items are selected and which are not.  I don't want to remove the item - just do some processing on it then de-select it. Merry Christmas to you all!! Steve ---------------------------------------------------------------------- JuhaManninen · 2019-12-17 17:12 Quote from: SteveSS on December 17, 2019, 05:56:12 pmfor i := 0 to listbox.items.count - 1 do begin   if listbox.items.selected = true then     do something ...... end; Almost... Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i for i := 0 to listbox.items.count - 1 dobegin  if listbox.selected[i] then    do something ......end; ---------------------------------------------------------------------- SteveSS · 2019-12-17 17:17 Thanks JuhaManninen.  Works perfectly - I knew there would be a simple solution - just couldn't find it. Thanks again. Steve