Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Forms and scroll bars
Message
From
04/04/2002 00:14:30
Jordan Pastourel
Worksafe Management Systems
Toowong, Australia
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00640700
Message ID:
00640710
Views:
10
all i did was create a form, change the scrollbar property to 2 and added the following code to the load event:

set default to f:\
use in 0 c:\compdtl
use in 0 c:\wims
***********************************************
*** Setting up the checkboxes on the left side
***
longest = 0 && the longest width of field name
top1 = 0 && the top for the next chaeckbox to be placed at
select compdtl
r=afields(thearr)

for i=1 to r && adds in all the fields from the existing table
addname = 'source' + alltrim(str(i))
thisform.addobject(addname, 'CheckBox')
thisform.&addname..top = top1
thisform.&addname..autosize = .t.
thisform.&addname..caption = alltrim(thearr[i,1])
thisform.&addname..alignment = 1
thisform.&addname..tag = str(i)
top1 = top1+20
if thisform.&addname..width > longest
longest = thisform.&addname..width && the longest width
endif
endfor

for k=1 to r && positions all the checkboxes in a line
addname = 'source'+alltrim(str(k))
thisform.&addname..left = longest
thisform.&addname..visible = .t.
endfor

***********************************************
*** Setting up the checkboxes on the right side
***
top1 = 0 && the top for the next chaeckbox to be placed at
select wims
r=afields(thearr2)

for l=1 to r && adds in all the fields from the existing table
addname = 'imp' + alltrim(str(l))
thisform.addobject(addname, 'CheckBox')
thisform.&addname..top = top1
thisform.&addname..left = longest + 600
thisform.&addname..autosize = .t.
thisform.&addname..caption = alltrim(thearr2[l,1])
thisform.&addname..alignment = 0
thisform.&addname..tag = str(l)
thisform.&addname..visible = .t.
top1 = top1+20
endfor



so as you can see it just gets 2 tables fields and displays them on a form as a checkbox.
Jordan Pastourel
Development Manager
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform