What's a button? Is it just a game object, or does it have a widget on it? The code doesn't actually check for something being disabled. If it's anchored, it will use it. The disabled object may not update its anchors in turn, but its dimensions and position will still be used.