DesktopToolbarButton.Pressed

From Xojo Documentation

Property (As Boolean )
aDesktopToolbarButton.Pressed = newBooleanValue
or
BooleanValue = aDesktopToolbarButton.Pressed

New in 2021r3

Supported for all project types and targets.

True if the DesktopToolbarButton was pressed. It can be used to set the toggled state of a toggle-style DesktopToolbarButton at runtime.