how do I make a ribbon button selected?

C

Colbert Zhou [MSFT]

Hello Dave,

We call this kind button ToggleButton, which can have two statuses(pressed
and not pressed). To make a toggle button as selected, we need to specify a
callback function for its getPressed property in the Ribbon XML. Then if
you return true from the callback function, the toggle button is selected.
If you return false from the callback function, the toggle button is not
selected.

For an example, we can synchronize a ribbon's toggle button status with a
task pane's visibility. If the task pane is visible, we set the toggle
button selected, if the task pane is invisible, we set the toggle button
unselected. Andrew Whitechapel has blogged this topic here,
http://blogs.msdn.com/andreww/archive/2006/10/20/synchronizing-ribbon-and-ta
sk-pane.aspx

Hope this helps and have a nice day!


Best regards,
Ji Zhou
Microsoft Online Community Support
 
D

David Thielen

Hello Dave,

We call this kind button ToggleButton, which can have two statuses(pressed
and not pressed). To make a toggle button as selected, we need to specify a
callback function for its getPressed property in the Ribbon XML. Then if
you return true from the callback function, the toggle button is selected.
If you return false from the callback function, the toggle button is not
selected.

For an example, we can synchronize a ribbon's toggle button status with a
task pane's visibility. If the task pane is visible, we set the toggle
button selected, if the task pane is invisible, we set the toggle button
unselected. Andrew Whitechapel has blogged this topic here,
http://blogs.msdn.com/andreww/archive/2006/10/20/synchronizing-ribbon-and-ta
sk-pane.aspx

Hope this helps and have a nice day!

Thank you.

david@[email protected]
Windward Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com

Cubicle Wars - http://www.windwardreports.com/film.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top