Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating and placing objects
Message
From
26/05/1999 19:21:54
 
 
To
26/05/1999 17:52:47
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00223206
Message ID:
00223240
Views:
26
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
Map
View

Click here to load this message in the networking platform