Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Drawing 8 x 8 grid programmatically
Message
De
11/10/2006 14:35:46
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
11/10/2006 14:24:48
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01161278
Message ID:
01161280
Vues:
12
>Hi All,
>
>Is there a way to draw a n x n grid using shape and line object? Is there any previous articles and discussion on this?

Just draw a number of vertical lines, incrementing the .Left property by the desired amount. Similar for the horizontal lines. I don't think this would merit an article.

Here is a quick test (for the vertical lines):
local lnOffset
lnOffset = 10
lnSpacing = 30
lnHeight = 100
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 = 100
	o.Width = 0
	o.Visible = .T.
next
I didn't take the trouble to calculate the correct size.
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)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform