Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Programatically center an image control..
Message
De
10/01/2007 11:09:36
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 6
Divers
Thread ID:
01182600
Message ID:
01184223
Vues:
18
Here:
local tvalue
local cImgName
local lnDistance, lnImgWidth, lnFormWidth

sele csrtable
go top

nadd = 0
lnDistance = 200
lnImgWidth = 75
lnFormWidth = _screen.width

lnImgCount = INT( (lnFormWidth - lnDistance) / (lnImgWidth + lnDistance) )
*lvalue = (lnFormWidth - (lnImgCount * lnImgWidth) - ((lnImgCount-1) * lnDistance)) / 2
lnleft = INT((lnFormWidth - (lnImgCount * lnImgWidth)) / (lnImgCount+1) )

thisform.root.picture=locfle
if .not. eof()
	skip
	do while .not. eof()
		tvalue = thisform.root.top+121
			
		cImgName = alltrim(csrkey)
		thisform.addobject(cImgName, 'Image')

		with evaluate('thisform.' + cImgName)
			.visible=.t.
			.stretch=1
			.width=75
			.height=75
			.top=tvalue
			.left=lnleft
			.picture=locfle
			.borderstyle=1
		endwith
		lnleft = lnleft + 200
		skip
	enddo
endif
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform