“Disabled” button isn’t

I have some push buttons I want not showing and not executing their code for certain records or other conditions. I planned to tweak them so with objectaction and untweak them for for other conditions. On testing my plans manually, checking “transparent” renders the button invisible, but also checking “disabled” does NOT prevent its code from being triggered and running when the invisible location is clicked. I’ve tried this on a few different square buttons with Rich Text checked and different code. One such had title

If this is the expected behavior I could recode the buttons with if structures so they didn’t do anything under those conditions. But I’m concerned they still might prevent clicks from passing thru to lower objects. I’d hoped “disabling” them would remove that concern. I may need more design thought on object order and it’s implications

If your buttons are in a common territory on your form, take a look at Panels. You can have a panel that contains the buttons under some circumstances and a panel that does not for other circumstances.

Panels can be any size you want them to be and a single form can contain one or several panels.

I’ve used Tab Panels before and considered using them for this, but so far procedurely ‘hiding’ and unhiding objects seems easier here, presuming I can figure out how. I’m trying to make a facsimile of a my favorite created HyperCard stack in PanX as it appears its current version, in SuperCard, dies when Pan6 dies. Mostly it ran there on a rough equivalent of 3 panels. But there are dozens of individual small bits that pop in and out of each. Reducing the basic 3 to 1 was conceptually straightforward if I can get some buttons in and out on demand. If I can solve that I hope similar methods will handle the many bits of images and text popping in and out I’ve yet to tackle. I’m not yet sure how many panels it would take to accommodate all of their variations but it might need dozens. If I can’t disable the buttons effectively I might store their procedures as a text array in a variable and move those in and out as needed. Or even store whole buttons in blueprint form to add/delete on command. But this had seemed the easiest first tactic.

The trick to accomplish what you are requesting involves the procedure code of the button. This code will change a button named “myButton” to transparent and disabled with no code attached.

changeobject "myButton",

This will also allow click-thrus to buttons below. If a transparent button has any code attached it will not allow the click-thru. I have actually used that trick to mask a Text List Object except for the scroll bars so that nothing could be selected and yet still be able to scroll.

Of course to reverse things you would reissue the opposite code to reenter the procedure text and reset the transparency and disabled flags.

Thanks Gary! I can do that.