Hi Folks

I'm trying to add some "Custom Filtering" via toggle buttons in the ribbon. The idea is that there are 4 main sections (blocks) of columns, and i'd like to put 4 toggle buttons in the ribbon to hide or show the blocks/sections of interest, depending on what the user will toggle on/off; in the end to allow the user only print the relevant sections and to avoid a printout that's longer than the room lol

For that, I've appended the ribbon images to the file (e.g. 1 with a color background for not toggled, and 1 with gray background for toggled; and that for each of the 4) using the CustomUI editor.

<?xml version="1.0" encoding="utf-8"?>
<customUI onLoad="subRibbonOnLoad" xmlns="http://schemas.microsoft.com/office/2009/07/customui">
<ribbon startFromScratch="false" >
<tabs>
<tab id="Allgemein" label="Allgemein" insertBeforeMso="TabHome" getVisible="subGetVisible" tag="wsAllg">
<group id="Ansicht_Allg" label="Ansicht">
<toggleButton id="Toggle_1_Allg" size="large" image="Icon_11" screentip="1 Managementfähigkeiten" onAction="subMatrixAnsicht" />
<toggleButton id="Toggle_2_Allg" size="large" image="Icon_21" screentip="2 Fähigkeiten im Verhalten" onAction="subMatrixAnsicht" />
<toggleButton id="Toggle_3_Allg" size="large" image="Icon_31" screentip="3 Fachkompentenz allgemein" onAction="subMatrixAnsicht" />
<toggleButton id="Toggle_4_Allg" size="large" image="Icon_41" screentip="4 Fachkompetenzn anlagenspezifisch" onAction="subMatrixAnsicht" />
</group>
</tab>
</tabs>
</ribbon>
</customUI>

Now, the problem is to make these buttons useful. For each image, i've appended a greyed out version (e.g. Icon_11 in color and Icon_10 in grey background).

So now, the first issue is to make the buttons respond to clicks and with that to change the images in question (i.e. color or grey).