General information
Category:
Object Oriented Programming
SCAN
THISFORM.Container1.AddObject("chk"+allt(str(recno())),"checkbox")
loCheck = eval("THISFORM.Container1.chk"+ allt(str(recno())))
loCheck.Visible = .t.
loCheck.Value = yourtable.LogicalFlag
loCheck.Caption = yourtable.Name
loCheck.Top = (THISFORM.Container1.Height/recc())*(recno()-1)
loCheck.Left = 5
ENDSCAN
But to bind the data to the values in the table, the only thing I could
think of was using a grid.
A slightly off the wall option for this would be just like this but
have the save button perform the same scan loop but replace LogicalFlag
with loCheck.Value on the way out.
Now if you have 16 columns instead of 16 rows then change the scan loop
into a for loop using the afields command to move through the columns.
And then you could bind the checkbox to the column.
>Suppose you have a table with 16 records and you wish to programatically create a checkbox for each record and put the objects on a container object and space them equally on the container with captions (from a field in the same table). Is this an extremely difficult task? Has anyone done this? Can it be done without jumping through to many hoops?
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only