Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Thumbnails in a container
Message
From
30/09/2005 03:51:39
Aaron K. Y. Chu
Health & Care Co. Ltd.
Hong Kong, Hong Kong
 
 
To
30/09/2005 02:50:32
General information
Forum:
Visual FoxPro
Category:
Pictures and Image processing
Miscellaneous
Thread ID:
01054762
Message ID:
01054771
Views:
13
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!

********************************************************
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform