I am trying to create a few checkboxes, how many is decided by the recordcount of a query. Also i need to set the loction of the check box +38 from the previous location. Anyone give me some help with this? not sure how to create the checkboxes, The rest i should be able to do…anyhow he is what i have so far.
var
i, top,left : integer;
begin
......
left := 81;
top := 119;
while i < qry.RecordCount do
begin
// create check box
// set caption of checkbox to i
// set checkbox loction to left + 38, top
// left = left+38??
end;
After clarifying your needs, I would recommend you to use
TObjectListas a container for your check boxes. This list can own the objects, what allows you to release them by a simple removing the item from the list either byClearor byDelete. It also provides a simple access to each element by typecasting the obtained indexed item object to your known class type. More in the following untested pseudo-code: