ICommand.Pressed [Property][Get/Set]
- Last UpdatedJul 18, 2023
- 1 minute read
Gets and Sets this command's Pressed state.
Defined As
-
[VBA] Boolean Pressed
-
[Cicode] INT Pressed
-
[C++] VARIANT_BOOL Pressed
Execution Result
If the property get succeeds, the return value will be Success. If the return variable is bad, the return value will be InvalidArgument.
Limits
-
True (-1): Pressed
-
False (0): Impressed
Remarks
This is only useful for toggle buttons, indicating whether or not the button is in a pressed down state. The setting of this property is only valid for custom commands.
Calling Syntax
This example assumes there is a valid Command object as retrieved from a Process Analyst's CommandSystem. (for example, VBA: ProcessAnalyst.CommandSystem.Item(1))
[VBA]
Sub Example(Command As Object)
Dim pressed As Boolean
`Getting Property value
pressed = Command.Pressed
`Setting Property value
Command.Pressed = True
End Sub
[Cicode]
FUNCTION Example(OBJECT hCommand)
// Getting property value
INT Pressed = _ObjectGetProperty(hCommand, "Pressed");
// Setting property value
_ObjectSetProperty(hCommand, "Pressed", -1);
END