how to store and extract integer value to CheckListBox

edited 10:40AM in FastReport 4.0
How to add and then extract integer value to CheckListBox?

I did something like this:
if DS_Stawki.Active then DS_Stawki.Close;
     DS_Stawki.Open;
  while not DS_Stawki.Eof do
  begin              
  CheckListBox1.Items.AddObject(<DS_STAWKI."string">,TObject(<DS_STAWKI."ID">));
  DS_Stawki.Next;                                  
  end;



But how to extract ID value?
I Try this:
for i:= 0 to  CheckListBox1.Items.Count -1 do
 if CheckListBox1.Checked[i] then
 begin
     ID := Integer(CheckListBox1.Items.Objects[i]);
 end;

I get error: too many parameters

Comments

  • edited 10:40AM
    Can onyone to help me?
    It's very needed!
  • edited 10:40AM
    Try to use

    ID := StrToInt( VarToStr( CheckListBox1.Items.Objects))


    Mick

Leave a Comment