Rex,
Setting enabled=.f. should grey out the command button. Are you sure the bindevent() was working? My framework uses this technique to show if any data has changed or not. I enable/disable save and cancel buttons so the user can tell if data has changed.
>Hi James,
>
>Dopey me! I definitely DO have all my objects subclassed however I have not previously created a custom method of a subclassed object. By looking harder, I found it in the menu.
>
>Anyway, I added the code but the buttons whilst technically disabled (that is, they do NOT function whilst the child form is open and has focus) the buttons still 'appear' enabled.
>
>The bottom line is I didn't really explain what I wanted in full. I need to grey out the buttons so that not only are they disabled, they appear disabled. I hope I have now explained the problem.
>
>Are you aware of a code snippet that loops through the objects (in this case buttons) and saves their
enabled state to an array so that they can be bulk disabled -
Here is the code that I think you are talking aobut.
for each loObj in thisform
if loObj.baseclass = "Commandbutton"
loObj.enable = .f.
endif
next
If you have command buttons in containers you will have to drill into them as well.
>
>.SetAll("ecommand",.F.,"Enabled")
>
>then returned to their proper state once the child form is closed?
>
>Regards..Rex
>
>Vale...Steve Irwin!!!