Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Defining class question
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 6 SP5
Divers
Thread ID:
00997634
Message ID:
00997646
Vues:
12
This message has been marked as a message which has helped to the initial question of the thread.
>Sorry about vague title.
>
>I have a grid. When the grid is built in code I want one of the columns to have checkbox class instead of textbox. So I remove the textbox and add a checkbox-based class:
>
>
>.RemoveObject( "Text1" )	
>.AddObject( "print_it", "chk_select_to_print" )
>
>
>The following is the code that defines the "chk_select_to_print" class:
>
>
>DEFINE CLASS chk_select_to_print AS CHECKBOX
>
> PROCEDURE InteractiveChange
>
>  if this.value
>     * my code goes here
>  else
>     * my code goes here
>  endif		
> END PROCEDURE
>		
>ENDDEFINE
>
You didn't forget to set column's sparse property to .f. and set this.column3.print_it.visible = .t., right?

And you're sure, that the checkbox has logical value (because it's often 1/0 rather than .t./.f.). Finally you may put your code into valid event.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform