How can i get a disable button properties

I have a drop down menu. this drop down menu is by default is disable. but i want when any user click or tap on this disable drop down menu on that time showing an error message . how can i do that. Please developers help me out .
Thanks

hello, share a sample example to understand your situation.

Share your code please ?