Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Set InteractiveChange programatically?

Status
Not open for further replies.

SuperBob

Technical User
Sep 18, 2001
23
GB
I have defined a grid on a form ,and want to be able to set the InteractiveChange method from within the form, but cannot because this is read-only. I want to do this because I am adding a checkbox to a grid column programatically and need to set this method.

I could define a new checkbox subclass with the appropriate InteractiveChange defined, but cannot do this within the form either!

Any help appreciated.
 
Hi SUperBob

1. Defining the code only for an instatiated event is not possible by concept.

2. I could define a new checkbox subclass with the appropriate InteractiveChange defined, but cannot do this within the form either

YOu have to do this at the place where you are adding the checkbox class...

SET PROCEDURE TO myClassDefintion
ThisForm.Grid1.Visible = .f.
WITH This Form.Grid1
.Visible = .f.
.Column1.REMOVEOBJECT("Text1")
.Column1.AddObject("CheckBox1","myCheckClass")
.Visible = .t.
ENDWITH

This will solve your problem. Assumed that your check class contains the control source, event codes etc. propery defined in a separate myClassDefinition.PRG
OR made available in your CLASS LIBRARY and referenced propery in ADDOBJECT code.

:)
ramani :)
(Subramanian.G),FoxAcc, ramani_g@yahoo.com

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top