Panel1.Gravity = Bottom 'Align Panel1 to bottom of parent panel
Panel1.Gravity = Bottom + Left + Right 'Align Panel1 so it fills bottom of parent panel (its height will not change)
Panel1.Gravity = Center 'Align Panel1 to vertical & horizontal center of parent panel
Panel1.Gravity = Fill 'Align Panel1 so it fills its parent panel
Panel1.Gravity = TOP + BOTTOM + RIGHT 'Align Panel1 to right edge and height of parent (its width will not change)
Panel1.Gravity = Center_Horizontal 'Align Panel1 so it is centered horizontally within its parent
Panel1.Gravity = Center_Vertical 'Align Panel1 so it is centered vertically within its parent
If the parent panel has more than one panel with Gravity=Right, then the panels will align with each other (to prevent the panels from stacking on top of each other).
So when a Panel (or activity) is resized, the panels that it contains will be realigned automatically.
Also a Panel.Border (Rect) property would be welcomed because then we could define a gap between the Panel and what it is aligned to.