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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Click event for Checkbox in Grid Column VPF9SP2 1

Status
Not open for further replies.

foxlover2012

Programmer
Sep 2, 2012
29
US
Hi all,
I have a checkbox in a grid column working perfectly, except for the fact that there is no click event or interactive change event available.
How can I respond to a user when they click on the checkbox?
Thanks, John
 
You have to edit the grid, then select the column, then the checkbox, you can then edit the method for interactive change.

You might be having problems, if there is ore than one control for the column, you need to either delete any others or
make sure the check box is the current control.

Also, you need to set the sparse property for the column to the non-default value of false, or your users won't be able to interact with the
check-box so easily anyway.

Good luck

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.
 
Thanks for the reply.
My checkbox is working exactly as it is supposed to.
However, there is no Interactive change, programmatic change or Click method under the Methods tab.
I tried creating a custom checkbox class, but from the class designer, I cannot drag it into the grid cell.
These methods are all available in the custom class!
I will trying add the custom class via code.

Thanks. John


 
If you edit the grid in the way I suggested, drilling right down to the checkbox, you should have the methods you want available to you.

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.
 
Got it!
I had to select "check1" from the pull down menu in the properties tab to get the Methods to show up.
If you drill down using ctrl-click, the methods Click, etc. do not show in the methods tab!
Thanks.
 
If you drill down using ctrl-click, the methods Click, etc. do not show in the methods tab!

That's because the grid column still contains the original text box - even though you also added a checkbox. When you did Ctrl+Click, you selected the text box. The check box was behind it.

Ideally, you should have done as Griff suggested, and deleted the text box. However, the way you did also works.

Mike



__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top