Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Member Class in Grid
Message
De
27/08/2003 15:01:56
 
 
À
26/08/2003 20:08:31
James Blackburn
Qualty Design Systems, Inc.
Kuna, Idaho, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00823636
Message ID:
00823904
Vues:
22
But can't you just define a column class that uses your TextBox and then use the Grid's MemberClass properties to add your specialized column? I do believe that's the intent of the whole MemberClass animal.


>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.
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform