SetCommandOptions Method
Applies To
BasicTcl Object, AdvancedTcl Object
Prototype
SetCommandOptions(Interpreter As Long, CommandName As String, Options As Long, Reserved As Long) As Long
Input
The "Interpreter" parameter, which must be a valid interpreter pointer. The "CommandName" parameter, which must be the name of an existing custom command added with the CreateCommand method. The "Options" parameter, which specifies the desired options for the specified command. Please refer to the TCLBCommandOptions page for the available options. The "Reserved" parameter, which is reserved for future use and must be zero.
Output
None.
Returns
Undefined.
COM Results
S_OK: Success.
E_INVALIDARG: Either a NULL pointer was passed, the "Interpreter" parameter is invalid, or the custom command specified by the "CommandName" parameter was not found.
E_FAIL: The object is not properly initialized (should not occur).
Side Effects
None.
Description
This sets the options that are enabled for the specified command.
Notes
None.
Example
Private Sub Command1_Click()
    Dim poTcl As TclBridge.BasicTcl
    Dim plInterpreter As Long
    Dim plOptions As Long

    Set poTcl = New TclBridge.BasicTcl

    Call poTcl.CreateInterpreter(plInterpreter)

    Call poTcl.CreateCommand(plInterpreter, "Tester1", poClass, "Test1", 1234&, 0&)

    Call poTcl.SetCommandOptions(plInterpreter, "Tester1", TCLBCommandOptions.TCLB_cJOIN, 0&)

    Call poTcl.GetCommandOptions(plInterpreter, "Tester1", plOptions, 0&)

    MsgBox "Options = " & plOptions, vbInformation, App.Title

    Call poTcl.DeleteCommand(plInterpreter, "Tester1")

    Call poTcl.DeleteInterpreter(plInterpreter)

    Set poTcl = Nothing
End Sub