NewEnabled property (WinStudio scripts)
Applies To
IWSIDOCollection interface
Definition
Enables/Disables the New operation for a specified IDO collection, or returns a value indicating whether the New operation is enabled.
Set Syntax
object.NewEnabled = Boolean
| Part | Description |
| object | Required. A reference to a valid IDO collection object. |
| Boolean | Required.
Determines whether the New operation is enabled:
|
Get Syntax
object.NewEnabled
| Part | Description |
| object | Required. A reference to a valid IDO collection object. |
Remarks
The New operation determines whether the user can create a new object in the specified collection. If the New operation is disabled, the toolbar icon is disabled, the option does not appear on the menu, and the keyboard command does not work.
For the get syntax, a return value of:
- TRUE indicates that the New operation is enabled.
- FALSE indicates that the New operation is disabled.
Examples
Sub Main() Dim oCache As IWSIDOCollection Dim sOption As String oCache = ThisForm.CurrentIDOCollection sOption = Trim(GetParameter(0)) If sOption = "NEW" Then oCache.NewEnabled = True End If End Sub
Sub Main()
Dim oCache As IWSIDOCollection
oCache = ThisForm.CurrentIDOCollection
If oCache.NewEnabled Then
oCache.NewEnabled = False
Application.ShowMessage("You cannot create a new object at this time.")
Else
oCache.NewEnabled = True
Application.ShowMessage("Ready to create new object.")
End If
End Sub