Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Thumbnails in a container
Message
De
30/09/2005 03:51:39
Aaron K. Y. Chu
Health & Care Co. Ltd.
Hong Kong, Hong Kong
 
 
À
30/09/2005 02:50:32
Information générale
Forum:
Visual FoxPro
Catégorie:
Photos et traitement d'images
Divers
Thread ID:
01054762
Message ID:
01054771
Vues:
14
Actually, I find a thumbnail control ActiveX for that purpose... I add into a scrollbox container created by Alex Grigorjev in 2002 (available in download section), like so
nTop = 0
nLeft = 0
nSpace = 10
nTotalWidth = ThisForm.SBc.Width

CHDIR GETDIR()
n=ADIR(pict)
With ThisForm.SBc.clientarea
FOR x = 1 TO 30
	z = ALLTRIM(pict[x,1])
	ext = UPPER(RIGHT(z,LEN(z)-RAT('.',z)))
	IF ext = "BMP" OR ext = "JPG"
		lcObjName = "image" + Transform(x)
		.AddObject(m.lcObjName,'olecontrol','ThumbCtl.ThumbCtl.2')
		loLabel = evaluate("."+m.lcObjName)
		WITH lolabel
			.height = 80
			.width = 100
			.displayfile(SYS(5)+CURDIR()+z)
			.visible = .T.
			.top = nTop
			.left = nLeft
			IF nTotalWidth - nleft- .width - nSpace >= .width
				nLeft = nLeft + .width + nSpace
			ELSE
				nTop = nTop+.height + nSpace
				nleft = 0
			ENDIF
		ENDWITH
	ENDIF
ENDFOR
ENDWITH

ThisForm.SBC.CalcAutoRange
Thisform.SBC.Move(Thisform.SBC.left, Thisform.SBC.top, Thisform.SBC.width+1, Thisform.SBC.height+1)
Everything is fine, except the scrollbar could not scroll up and down; the thumbnail displayed correctly...
Best regards,

Aaron Chu

********************************************************

Working with Visual FoxPro is a lot of FUN!

********************************************************
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform