I think the only way to do that is to first uncheck the "Browse" checkbox for the container field (in the inspector) and only once this is done, assign a script to the field.
1 of 1 people found this helpful
Yes - u have to block the ability to enter the container to avoid the expected response of tapping into a container field. I use a button framework that makes use of containers to display a variety of buttonNess.
I lock them all down so they cant be entered (as mentioned - deselecting the browse / find checkboxes).
Then, rather than make the container a button, I lay one of the shapes over the top of the container and buttonize it. I always use the states made available such that normal (starting position) is invisible. By doing this, it makes whatever is in ur container the buttons graphic.
On hover, I use a gradient setting which keeps the opacity dialed down to 20ish percent. By doing this, u get a nice glow when u hover around. On press I do a handful of things all in the name of providing the visual / feel I'm after. The other advantage to using shapes for buttons is the ability to control the outlined shadow shape that is produced by buttons. Circles work very well.
I'll cut myself off at risk of sounding like a buttonDork. Suffice it to say, that's only chapter one to making a top shelf button ;)
Thanks for the assist(s) and the in-depth lesson on creating a great button effect on a container!