FormDataModified property (WinStudio scripts)
Applies To
IWSForm interface
Definition
Returns or sets a Boolean value indicating whether the Save button on the Windows client toolbar is enabled or disabled.
Get Syntax
object.FormDataModified
Part | Description |
object | Required. A reference to a valid form object. |
Set Syntax
object.FormDataModified = Boolean
Part | Description |
object | Required. A reference to a valid form object. |
Boolean | Required.
Determines whether the the Save button is enabled:
|
Remarks
In the Get syntax, a return value of:
- TRUE indicates that the Save button is enabled.
- FALSE indicates that the Save button is disabled.
When using the Set syntax, enables or disables the Save button, regardless of whether data in a collection is modified and regardless of whether the Save operation for a collection is enabled.
Windows client normally determines whether the Save button is enabled in run-time mode by checking whether the Save operation is enabled for the current collection and whether the data in the current collection has been modified. This property enables or disables the Save button regardless of either of these conditions. This property allows you to override WinStudio's default behavior and to determine when a save can be performed.
Once your application sets this property, the application must control the enabled and disabled state of the Save button and it must handle the StdFormSave operation. The application can set the property to FALSE if the Save operation executes successfully.
Example
Sub Main() ' Toggle the FormDataModified property. If
ThisForm.FormDataModified Then ThisForm.FormDataModified = False Else
ThisForm.FormDataModified = True End If
Application.ShowMessage("The FormDataModified property is set to " & _
ThisForm.FormDataModified) End Sub