Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with custom column class
Message
De
10/12/2003 14:11:29
Larry Long
ProgRes (Programming Resources)
Georgie, États-Unis
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00857586
Message ID:
00857803
Vues:
25
Under the "HeaderClass" help article it says...

"The HeaderClass property is used instead of MemberClass for a Column parent container. For more information about the MemberClass property, see MemberClass Property."

Using the code below with the class def shown further below, when I set the MemberClass and MemberclassLibrary to the custom column class, the columns do not instantiate and error saying that the object is of "wrong type"

Form's init...

thisform.grid1.MemberClass='kr_column'
thisform.grid1.MemberClassLibrary='test.prg'
thisform.grid1.columncount=3

(Note:Form set to private data session and no table open in DE)


>Larry,
>Where do the docs state that? That would be totally incorrect.
>
>The MemberClass/MemberCLassLibrary properties of the Grid specify the Column class to use. The HeaderClass/HeaderClassLibrary properties of the Column class specify what header to instantiate in the Column container.
>
>HTH.
>
>>I am having trouble instantiating a non-visual custom column class. The docs say to use the HeaderClass (and not the grid's MemberClass) property for custom columns but does show an example. (I don't understand why you wouldn't use the grid's Memberclass, since the only child members in a grid are columns) Can someone pls show me an example?
>>
>>This is what I have so far...
>>
>>DEFINE CLASS kr_Column AS COLUMN
>> PROCEDURE INIT
>> DODEFAULT()
>> THIS.ADDOBJECT('kr_Text','kr_TextBox')
>> THIS.CURRENTCONTROL='kr_text'
>> ENDPROC
>>ENDDEFINE
>>
>>DEFINE CLASS kr_TextBox AS TEXTBOX
>> CURRENT=.F.
>>ENDDEFINE
>>
>>TIA,
>>Larry Long
L.A.Long
ProgRes
lalong1@charter.net
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform