>Simple question, but giving me a hard time. How do I disable or enable a command button using the THIS or THISFORM command. The command button is in a form and I want to have the button enabled only if the user needs to use the button. In other words, how do I reference the enable/disable options using the THISFORM command. Thanks, Mike.
The way I usually do it is the REFRESH method of the button itself, i.e. THIS.ENABLED=IIF(THISFORM.MyProperty=.T.,.T.,.F.)
Now call MyButton.Refresh when Myproperty changes.
Same thing could be achieved with
LPARAMETERS SetActive
THIS.ENABLED=IIF(SetActiveOnOff,.T.,.F.)
Call with THISFORM.MyButton.Refresh(.T.) or (.F.), as it were.
Hope this did it, write back otherwise.
Peter
Peter Pirker
Whosoever shall not fall by the sword or by famine, shall fall by pestilence, so why bother shaving?
(Woody Allen)