I run across the need for this constantly. I have a series of widgets arranged horizontally or vertically and I want them to have some consistent amount of space between them. I might have a vertical series of form fields that I want to be set 10px apart, or a row of tabs in a tab bar component where I want 24px between each tab. Or (and this happens literally every single day) I want my widgets to line up with zero space between.
In each of the above cases, I do the following:
- Select all the widgets I’m trying to lay out.
- Align them vertically or horizontally, based on the left- or top-most widget.
- Select all but the left or top widget and drag/move via keyboard until they are the correct distance apart (or congruent in the case of zero space, which by the way is very very difficult to discern sometimes).
- Continue this process until I’m done.
- Make some small change to one of those widgets that gets thing out of alignment.
- Start back at step 1 and repeat.
The Distribute tool allows something of a workaround here since you can use it to evenly spread your widgets out from first to last, and then check the distance between them. But this is a pretty fiddly process, especially in the case where you want your widgets lined up congruently (zero space between).
If we had a Distribute By X tool where X was a number of pixels you can enter (0 to n), this process would be a dream, and I’d spend a lot less going GRRRR. Please consider adding it.
Thanks!
RW from Chicago