This is good practice going forward, but for now I've inherited several layouts that don't have this feature. I think there does have to be a Boolean involved.
This thread is 11 years old, but hopefully someone can help me with a couple of edits (I'll put them in different threads)
The main difference between this code and what I'm trying to achieve is that in my case, the "pad" is defined by th…