Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP 6.0 SaveAsClass - Header, Column,Page
Message
From
03/10/1998 12:01:39
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
03/10/1998 11:54:30
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00143459
Message ID:
00143602
Views:
37
>>
>>VFP 6.0 has a new AddProperty method that should do the trick for you.
>
>I don't really need to add properties at run time, but to be able to loop through existing properties. Something like
>
>FOR i = 1 TO THIS.PropertyCount
> THIS.Properties(i)
>ENDFOR
>
>I know that there is nothing like this, I would just like a way to let me do something like that.
Hi Erik,
This is saveprops custom method of one of grid classes. Designed especially for headers. Only saves font* and alignment props for myheader class to restore after replacing baseclass header. Hope helps
lparameters oControl, cArrayName
local jx, lnNewPos, nOldMemberCount, nMembers
local array aProperties[1]
with this
	nOldMemberCount = iif(type("."+cArrayName+"[1,1]")="L",0,;
					alen(.&cArrayName,1))
	nMembers = amembers(aProperties,oControl)
	for jx=1 to nMembers
		if inlist(aProperties[jx],"FONT","ALIGNMENT")
			if type("."+cArrayName+"[1,1]")#"L"
				dimension .&cArrayName.[alen(.&cArrayName,1)+1,3]
			endif
			lnNewPos = alen(.&cArrayName,1)
			.&cArrayName.[lnNewPos,1]=aProperties[jx]
			.&cArrayName.[lnNewPos,2]=getpem(oControl,aProperties[jx])
			.&cArrayName.[lnNewPos,3]=oControl.parent.columnorder
		endif
	endfor
endwith
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform