How do tie the procedure to the elements on the list?



  • ListBox.

    procedure TFUsers.FormCreate(Sender: TObject);
    var
      i: integer;
    begin
      QueryUsers.Connection := FConnection.MainConnection;
      QueryUsers.SQL.Clear;
      QueryUsers.SQL.Add('select login from users');
      QueryUsers.Active := True;
      QueryUsers.Open;
      for i := 0 to QueryUsers.RecordCount-1 do
      begin
        ListBox_ListUsers.AddItem(QueryUsers.FieldByName('login').AsString, ****);
        QueryUsers.Next;
      end;
    end;
    

    Where are the stars? How am I supposed to write a procedure?



  • ListBox_ListUsers.AddItem(QueryUsers.FieldByName('login').AsString, @MyProc);
    

    Right?


Log in to reply
 


Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2