Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cannot not add object to grid member object
Message
From
19/07/2005 13:01:54
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
 
To
19/07/2005 10:51:01
James Blackburn
Qualty Design Systems, Inc.
Kuna, Idaho, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows 2000 SP4
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01033840
Message ID:
01033917
Views:
20
>I have had problems in the past dropping controls on a grid even without the Member class. I started doing this in code and have not seen a promlem since. What I wish I could do is define a control for an individual column in the member class prg <s>.

That's what I do... my column class has this:

Init(tcCaption, tcSource, tcClass, tcClassLib)

The default for the class and classlib is my regular grid textbox (which exists primarily to pass its dblclick and rightclick to the grid - practically unnecessary now with Bindevents(), but this was created in VFP7).

After some checking, and applying defaults if needed,
	.Newobject("grdText",tcClass,tcClassLib)
	.grdText.Width=.Width
	.grdText.Visible=.T.
	If PemStatus(This.grdText,"readonly",5)
		.grdText.ReadOnly=.ReadOnly
	Endif
	.CurrentControl="grdText"
	.ControlSource=tcSource
	If PemStatus(This, "text1",5)
		.RemoveObject("text1")
	Endif
In implementation, the .init of the grid begins with
this.recordsource="(alias here)"
this.columncount=0
...
This.AddObject("colStatus","gcol","Stat",'curevdate.cStatus',"grdTextStatus","dcgrids.prg")
With This.colStatus
	.DynamicBackColor=lcDynBC
Endwith
...and so on for each column. At this point I already have Set Procedure to the prg containing the column class definition.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform