Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Member Class in Grid
Message
From
26/08/2003 20:08:31
James Blackburn
Qualty Design Systems, Inc.
Kuna, Idaho, United States
 
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00823636
Message ID:
00823646
Views:
27
Fred,

Too bad. It would have been nice to be able to define a default control different from the base textbox we get now. I find that the text1 control that always gets added is not if my control class addes my control at runtime. For example.
DEFINE CLASS cColumn AS column 
	HeaderClass = "cheader"
	HeaderClassLibrary = "cgridclass.prg"
	cControlClass = "cgrid_textbox"
	cControlClassLib = "cgridcontrols"
	cControlName = ""
	PROCEDURE init()
		LOCAL lcControl
		IF NOT EMPTY(this.cControlClass) AND NOT EMPTY(this.cControlClassLib)
			IF EMPTY(this.cControlName)
				this.cControlName = this.cControlClass
			ENDIF 
			this.NewObject(this.cControlName,this.cControlClass,this.cControlClassLib)
			this.CurrentControl=this.cControlName
			DODEFAULT()
			FOR EACH loControl IN this.Controls 
				loControl.visible = .t. 
			NEXT 
		ENDIF 
	ENDPROC 
		
ENDDEFINE
>>Hi All
>>
>>I can't find a way to set the control in a column except to addobject() the control. Is there not a memberclass for the control similar to the headerclass?
>>
>>Thanks
>
>Since a Column can only have a single header, you can use the HeaderClass and HeaderClassLibrary properties.
>
>If you're looking to add different controls along with the header, you'll have to do that in the Designer for each individual column, or at runtime using AddObject, but it sounds like you already know how to do that. There is no MemberClass properties except for the HeaderClass.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform