Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Subclassed grid members
Message
De
02/10/1997 11:33:38
 
 
À
01/10/1997 17:44:36
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00052763
Message ID:
00052869
Vues:
33
>>Dragan-
>>the way I have dealt with getting custom controls into a default grid. I have a grid class called smartgrid which pulls my classes in depending on the datatype of the controlsource of the column.
>
>Woops... left out the code
>FOR lnCount = 1 to this.ColumnCount
> ccolumn = this.Columns[lnCount]
> ccolumn.RemoveObject("header1")
> ccolumn.AddObject("myheader1","myheader")
> do case
> case type(ccolumn.controlsource) = "N"
> ccolumn.RemoveObject("text1")
> ccolumn.AddObject("myspinner1","myspinner")
> ccolumn.myspinner1.visible = .T.
> case type(ccolumn.controlsource) = "L"
> ccolumn.RemoveObject("text1")
> ccolumn.AddObject("mycheck1","mycheck")
> ccolumn.mycheck1.visible = .T.
> otherwise
> cColumn.RemoveObject("text1")
> ccolumn.AddObject("mytext1","Mytext")
> ccolumn.mytext1.visible = .T.
> endcase
>ENDFOR
>
>Of course you must have already created a header class with something like the following:
>
>DEFINE CLASS MyHeader AS Header
> PROCEDURE click
> blah, blah, blah
> ENDPROC
>ENDDEFINE
>
>You probably have something like this already laid out, but I thought I'd offer my solution to see if it gave any ideas. It might seem like jumping through hoops to get a simple outcome, but this class can be dropped on a form and VFP takes care of column sizing and controlsources for you. HTH

Where do you have the header class defined?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform