R
R
Romanson2017-01-15 13:39:36
Delphi
Romanson, 2017-01-15 13:39:36

How to get all selected items in Delphi listbox?

Hello friends, I have a question, I don’t understand how to find out all the selected lines in the Delphi fmx listbox.
If I set the ListBox MultiSelected to true and try to select a row, it only shows the last selected one.
But I still don’t understand how to use the CheckBox in the ListBox with the ShowCheckBox option enabled, maybe someone who solved the problem with the multi-selection will tell

Answer the question

In order to leave comments, you need to log in

2 answer(s)
Y
Yaroslav Ivanov, 2017-01-15
@Romanson

procedure TForm1.ListBox1Click(Sender: TObject);

begin

If ListBox1.Selected.Selectable = true Then
            showMessage(ListBox1.Selected.Text);
end;

end.

R
Romanson, 2017-01-15
@Romanson

[dcc32 Error] Unit4.pas(58): E2149 Class does not have a default property in Delphi FMX xe10.1 error when using

if ListBox1.Selected[0] = true then  
    showmessage('');

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question