This is a migrated thread and some comments may be shown as answers.

Button on ribbon disabled color

3 Answers 147 Views
RibbonBar
This is a migrated thread and some comments may be shown as answers.
Kuba
Top achievements
Rank 1
Kuba asked on 16 Dec 2013, 12:26 PM
Hi,

how can I adjust color of disabled button? By default image is changed to grayscale but in my program I need it to be darker.
How can I adjust it in Visual Style Builder?

Cheers,
Kuba. 

3 Answers, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 19 Dec 2013, 01:20 PM
Hello Kuba,

Thank you for contacting us again.

If your requirement is to modify disabled state for the ButtonInRibbonGroup, it is necessary to disable UseDefaultDisabledPaint for the RibbonBarButtonElement and specify the desired fill for the ButtonInRibbonFill in the Visual Style Builder. Please find attached a sample picture, illustrating more precisely my point. Then the custom theme should be applied for the desired button or to the entire application, depending on your specific case.

You can read more details about using the VisualStyleBuilder here:
1.     Loading predefined themes
2.     Working with Repository Items
3.     Saving and Loading Theme Files
4.     Loading Themes from an External File
5.     Loading Themes from a Resource
6.     Applying Theme to a Control
7.     
http://tv.telerik.com/watch/winforms/visualstylebuilder/whats-new-visual-style-builder-q1-2010

Please do not hesitate to contact us if you have any additional questions.

Regards,
Desislava
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Kuba
Top achievements
Rank 1
answered on 19 Dec 2013, 02:56 PM
Hi,
thanks for your reply, but it is not exactly my point.

The idea is, that button while disabled has its image changed to grayscale. In attachment you can see three buttons on ribbon. The one on the left is enabled, rest is disabled. By default their images are white, but when they are changed to gray, what is visible in this image. Unfortunately my program is all in different shades of gray, and disabled buttons images are too light. It's not about button fill, but about image fill.

Cheers,
Kuba.
0
Accepted
Dess | Tech Support Engineer, Principal
Telerik team
answered on 23 Dec 2013, 01:15 PM
Hello Kuba,

Thank you for getting back to me.

Your clarification helped me to understand better the exact requirement. However, when the Enabled property has value false, the RadButtonElement is displayed in grayscaling mode. The button image is rendered in grayscaling mode as well. But the white part in the image sightly defers from the Enabled=true state. The possible solution that I can recommend is to use different images for both of the states. You can apply different algorithms on the image rendering in order to obtain the desired distinguishable image. Here is a useful resource how to transform a colored image into a grayscaling one. You may follow similar approach to change the image rendering.

Please do not hesitate to contact us if you have any additional questions.

Regards,
Desislava
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
RibbonBar
Asked by
Kuba
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Kuba
Top achievements
Rank 1
Share this question
or