Treeview - Checkbox issue

I am using a Treeview control (version 6.0) and it doesn't appear
to have the ability to disable checkboxes or grey them out from what I
can tell (if I'm wrong, could someone tell me how?)

Since it doesn't, I'm at least trying to write code in the node click
event that will prevent the user from changing the value of the
checkbox when I need it to be disabled. So I have code that sets the
Checked status back to what it originally was before the user clicked
on that node.

The problem is that my code works fine, but that as soon as the event
terminates, it undoes what I did and sets the node to the Checked
status that caused the event to fire in the first place. I have no
way that I can see to trap this event and do what I want.

Is there something I may be missing? Also, if this is not the right
group - if you could tell me which group would be better that would be
great. Thanks!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Treeview - Checkbox issue

There isn't a BeforeCheck event for the treeview in Progress...I'm enclosing all the events I have available to me.

However, OCX.Click looks like it works. I can tie that one and OCX.NodeCheck together and get what I want in regards to preventing the user from changing the status of the checkbox.

But I'm still stuck on how to grey the checkbox out. It looked like some of the google group entries were talking about using TVS_CHECKBOXES but I'm unsure how to do this in Progress. I'm relatively new to the language so when it started talking about using API calls, I wasn't sure how to do that in this language. I'm sure it can be done but just not sure how.

Am I on the right path for greying out checkboxes? Is there information somewhere on how to make an API call thru Progress?

Events for Treeview.doc84 KB