How to disable a button

Hi Folks! Newbie here with quick question!

how do I disable a “Button”?

I have tried Button.Enabled=False (Where “Button” is the name of the Button)
All it does is “phantom” the button but the button is still clickable!!

I would like it to be phantom-ed out and not clickable!!

I also did Button.Visable=False and that worked (Just for info!)

Thanks in advance for any and all help!!!

If you want to take advantage of the enabled state controlling whether or not the button performs, you need to have your action in the Action event, not the MouseDown event.

There’s a number of great resources for beginners.

First, if you’re an absolute beginner to programming, there’s the textbook. It teaches you to program as well as use Xojo at the same time. Great two-in-one system.

There’s also a manual that comes with Xojo that teaches you the ins and outs of using the IDE, the language, and the features within. You can find that in the Documentation folder next to your installation of Xojo. There’s also an online language reference

Lastly, when you’re ready to learn from examples, there’s a folder full of example projects next to your Xojo install called “Example Projects” It helps when you don’t intend to reinvent the wheel. Do not copy and paste code from example projects, that won’t help you at all.

Best of luck to you :slight_smile:

Tim Parnell, Thank you for a very quick reply! I shall try this when I get home!!!

Thank you very much Tim Parnell! That worked like a champ… Much appreciated!