It would be nice to have a 'MaxHeight' and 'MaxWidth' in designer scripts.
e.g.
Same sort of thing for MaxWidth
e.g.
B4X:
MaxHeight(Height as int, FixTop as Boolean) 'If FixTop is True the button top stays same and bottom moves, Else Bottom fixes and top moves down
B4X:
button1.SetTopBottom(Panel1.Bottom, 100%y) 'button sizes to fill bottom of screen from bottom of Panel above
button1.MaxHeight(150dip, False) 'button will grow to a max of 150dip and will always sit on bottom of screen
Same sort of thing for MaxWidth