Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to automatically enable buttons
Message
From
05/11/1999 14:19:03
 
 
To
05/11/1999 14:17:45
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00287693
Message ID:
00287700
Views:
23
>>I have a no. of pages on a screen and 3 buttons to control
>>Adding,Saving or Cancelling data.
>>
>>Is there a way to automatically ‘enable’ the Save or Cancel button as soon as any field
>>has been changed. In other words I would like something with the following functionality:
>>
>>on_any_field_change thisform.MySavebutton.enable = .T.
>>on_any_field_change thisform.MyCancelButton.enable = .T.
>>
>>Maybe an assign method , but I have never used these ?
>>
>>Regards,,
>>
>>Gerard
>
>I do this using the InteractiveChange event. E.g., in the InteractiveDhange of a textbox to make sure there is data in the control to allow a save:
>
>
IF EMPTY( THIS.VALUE )
>    THISFORM.cmdSave.ENABLED = .T.
>ELSE
>    THISFORM.cmdSave.ENABLED = .F.
>ENDIF
>
>Bill

Oops, got the .T. and .F. backwards:

>
IF EMPTY( THIS.VALUE )
>    THISFORM.cmdSave.ENABLED = .F.
>ELSE
>    THISFORM.cmdSave.ENABLED = .T.
>ENDIF
Sorry
William A. Caton III
Software Engineer
MAXIMUS
Atlanta, Ga.
Previous
Reply
Map
View

Click here to load this message in the networking platform