WinStudio
IWSIDOCollection interface
Enables/Disables the New operation for a specified IDO collection, or returns a value indicating whether the New operation is enabled.
object.NewEnabled = Boolean
Part |
Description |
object | Required. A reference to a valid IDO collection object. |
Boolean | Required. Determines whether the New operation
is enabled:
|
object.NewEnabled
Part |
Description |
object | Required. A reference to a valid IDO collection object. |
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 New option does not appear on the Actions menu, and the keyboard command does not work.
For the get syntax, a return value of:
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