Hi,
I have got a problem with the styling of the buttontool.
I want it more clearly which buttons are disabled and which are not, without requiring the user to hover over the button.
So we decided to let the active button have a fixed border. But I can't seem to make the border setting on a buttontool conditional, based on enabled/disabled?
(Only background color has that possibility?)
How can I achieve this in an other way?
Kind regards,
Tobias Vandenbempt
Hello Tobias,
Thank you for contacting Infragistics.
I've attached a sample project that demonstrates how to use a DrawFilter to get the behavior you're looking for. The form has three toolbar buttons with one checkbox per toolbar button. Toggle the checkboxes to change the enabled state of the toolbar buttons.
Please let me know if you have any other questions about this.
You can Submit a Feature Request on the product ideas page.
That's a shame. We wanted to maintain the background color of the toolbar despite of the enabled/disabled state of the toolbarbuttons. The enabled/disabled state should be represented by the border, throughout the application.
So catching the enabled/disabled event in code is a solution but we were hoping that the appStylist could do this.
Maybe a suggestion for a future AppStylist update ?
TobiasV said:I want it more clearly which buttons are disabled and which are not, without requiring the user to hover over the button.
I'm a little confused by what you mean by this. By default, the button's BackColor and ForeColor will change when it's disabled. So it should be easy to tell which buttons are enabled without mousing over the button. My guess is that you are already applying some appearances to the button that makes it hard to distinguish. So you might want to look into the styling you are using, because the BackColor and ForeColor would be the standard way to indicate a disabled control.
TobiasV said:So we decided to let the active button have a fixed border. But I can't seem to make the border setting on a buttontool conditional, based on enabled/disabled?
There are no appearance properties for the border that are specific to the enabled state. But you could change the BorderColor on the tool at the same time you set the Enabled property.
*bump* This can't be that hard, can it?