Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Drawing 8 x 8 grid programmatically
Message
From
11/10/2006 16:04:02
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
11/10/2006 15:57:14
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01161278
Message ID:
01161307
Views:
14
>Hi Hilmar,
>
>How could I adjust the slant position the for the horizontal lines? What is the mathematical calculation for it?

For the vertical lines, .Width = 0, .Height = (whatever)

For the horizontal lines, .Height = 0, .Width = (whatever)

Or are you referring to something else?

I adjusted the sample code, to print an entire grid, but you must adjust calculations to make the following information varaible: horizontal offset; vertical offset; line spacing; number of lines.
local lnOffset
lnOffset = 50
lnSpacing = 30
for i = 1 to 5
	ThisForm.AddObject("LineVertical" + trans(i), "Line")
	o = eval("ThisForm.LineVertical" + trans(i))
	o.Left = lnOffset + (i - 1) * lnSpacing
	o.Top = 50 && hardcoded in this case
	o.Height = 120
	o.Width = 0
	o.Visible = .T.
next

for i = 1 to 5
	ThisForm.AddObject("LineHorizontal" + trans(i), "Line")
	o = eval("ThisForm.LineHorizontal" + trans(i))
	o.Top = lnOffset + (i - 1) * lnSpacing
	o.Left = 50 && hardcoded in this case
	o.Height = 0
	o.Width = 120
	o.Visible = .T.
next
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform