Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Defining class question
Message
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 6 SP5
Miscellaneous
Thread ID:
00997634
Message ID:
00997646
Views:
11
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform