Time for action – simple code layout example
It could get quite complicated if you laid out all of the card's controls with code, so we're only going to construct a simple case, to show the technique. You can enhance this later for more complex cases.
Create a new Mainstack.
Add four buttons across the width of the card.
Put this handler into the card script:
on resizeStack newWidth,newHeight put the width of button 1 into buttonWidth put (newWidth - 4 * buttonWidth)/5 into gap put the top of button 1 into buttonTop repeat with a = 1 to 4 set the top of button a to buttonTop set the left of button a to gap + (a-1) * (gap+buttonWidth) end repeat pass resizeStack end resizeStack
Resize the card window. The buttons should spread out evenly across the card.
Go to Standalone Application Settings and select the iOS option.
Make sure that the supported devices include iPad.
Set the orientation options to include all four orientations.
From the Development menu set the Test...