The version 2.2 introduces the visible status of the toolbar buttons.
The standard 2.2 configurations are already enabled, but you will need to add a new property to your custom configurations.
To make a toolbar button act like a toggle button, set its new property IsToggleButton to True.
Example of the ToggleLayers button
Before change:
<l:TBBtn
CommandParameter="ToggleLayers"
ToolTip="Layers palette"
Icon="%7_layers pallette_16.png" />
After change:
<l:TBBtn
CommandParameter="ToggleLayers"
ToolTip="Layers palette"
Icon="%7_layers pallette_16.png"
IsToggleButton="true"
/>
Note: the above works only for the scripts that have the IsChecked statement in the enabler. In the following example, the script for bold type has been ammended with IsChecked:="Chk_IsToggleFontBoldChecked":
<ShellCommand(CanExecute:="Ena_IsEditingArticleText", IsChecked:="Chk_IsToggleFontBoldChecked")> _
Public Overridable Sub ToggleFontBold()
Text.ToggleFontBold()
End Sub
The checker function has been added too:
Public Overridable Function Chk_IsToggleFontBoldChecked() As Boolean
Return Text.TestFontBold()
End Function