IsEnabled property for button is always true

1 Answer 48 Views
Buttons, RadioButton, CheckBox, etc
Sara
Top achievements
Rank 1
Sara asked on 27 May 2024, 08:19 AM

Hi, 

I want to know information if the button is enabled. I use inspect.exe and for the option 'UI Automation', and the IsEnabled property is always set to true. While for option 'MSAA', IsEnabled is not supported.

How can I check is button enabled or disabled?

1 Answer, 1 is accepted

Sort by
0
Dinko | Tech Support Engineer
Telerik team
answered on 27 May 2024, 11:24 AM

Hello Sara,

What comes up to my mind is to subscribe to the EnabledChanged event of the control. This event will be called when the Enabled property of the control is changed.

I am not sure if this will work in your scenario. Can you give it a try and let me know how it goes?

Regards,
Dinko | Tech Support Engineer
Progress Telerik

A brand new ThemeBuilder course was just added to the Virtual Classroom. The training course was designed to help you get started with ThemeBuilder for styling Telerik and Kendo UI components for your applications. You can check it out at https://learn.telerik.com
Sara
Top achievements
Rank 1
commented on 27 May 2024, 11:32 AM

But I want to get that information from another source, not from the code. In the code, everything works as it should. I need this for automation.

I set false for Enabled property for button and never change it, but IsEnabled is still true in inspect.exe. So Enabled property of button is not related with the IsEnabled field in the inspect tool.

Dinko | Tech Support Engineer
Telerik team
commented on 29 May 2024, 01:11 PM

In general, Telerik UI for WinForms components uses MSAA automation, not UIA. UI Automation is not supported. We have a plan to update our controls to support UIA, but at the moment of writing this reply, I can't bind to a time frame. 

As for your case, I wasn't able to find a proper way to achieve your requirements.

Tags
Buttons, RadioButton, CheckBox, etc
Asked by
Sara
Top achievements
Rank 1
Answers by
Dinko | Tech Support Engineer
Telerik team
Share this question
or