Seeking Help about RibbonButton.CheckOnClick

Dec 31, 2014 at 2:26 PM
Happy new year, everyone! At first, thanks for your work on this splendid ribbon suite.
I have just started using it and I am still exploring the possibility. However, there is a problem confusing me and I cannot figure it out.

One ribbon button is in the "DropDown" style and in its DropDownItems collection I have a ribbon button called "CheckOnClick" and its CheckOnClick property has been set to true.
But when running, this button shows no check mark on its left no matter how many times I click it. And actually, its property RibbonButton.Checked changes everytime I click it (true --> false or false --> true). Only no check mark shows.

I don't know whether I should do more apart from setting the CheckOnClick property. Hoping for your help.
Coordinator
Dec 31, 2014 at 10:45 PM
'Checked' for a button means selected/pressed, like a checkbox, but obviously a different graphical style. 'CheckOnClick' means the button can be in either of two states. Think of the Bold font button in Word. If the selected text is bold, then the button appears pressed.

If you want a checkbox in a dropdown, add a RibbonCheckbox instead of a RibbonButton.
Jan 1, 2015 at 4:46 AM
OK, thank you.

I think the behavior of RibbonButton varies from System.Windows.Forms.ToolStripMenuItem. For ToolStripMenuItem, if you set the CheckOnClick property, a check mask will appear/disappear on its left side when clicked.

I will use a RibbonCheckbox instead. Thank you for your help.
Jan 1, 2015 at 5:40 AM
Sorry, there is still something wrong after replacing RibbonButton with RibbonCheckBox. Please check the link to see the screen shots. (I have put the images in OneDrive, but OneDrive is blocked since I am in China. I don't know whether you can see the pictures; if not, please check the link.)
Image
Fig 1

After setting the DropDownResizable property to be true, we can get this:
Image
Fig 2

In a word, when the RibbonCheckBox is in a drop down list, only part of its text will be shown.

This is exactly what I want. It is done with ToolStripMenuItem. Can we use Ribbon to get it?
Image
Fig 3

Any help is appreciated.
Coordinator
Jan 1, 2015 at 5:57 AM
I see the images okay. Fig 1 is most likely the result of a bug. Fig 2 looks okay (given the alignment needs to be tweaked), or is there something I am missing? Obviously you shouldn't be required to use DropDownResizable because of a bug, but is it not a workable solution? Fig 3 would be nice to have but as given the bug list and limited development I would not hold out for this.
Jan 1, 2015 at 6:05 AM
Thank you all the same. I got it now. (^_^)
Coordinator
Jan 1, 2015 at 1:52 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Marked as answer by Stumpii on 1/8/2015 at 11:33 AM