Hier ist der Code, der in das Stack-Skript kopiert wird:
-------------------------------------------------------------------
-- Diese Konstante bestimmt den Namens-Prefix für die
-- Stack-Properties. Dieser Name ist im Prinzip beliebig
-- und kann nach eigenem Ermessen/Geschmack geändert werden.
constant kSizePrefix = "Sizeposition_"
-------------------------------------------------------------------
command save_control_positions
## Ermittlung der aktuellen Größe des Fensters, um den Größenparameter zu setzen
put the width of this stack & "_" & the height of this stack into tActualSize
## Name für die Größen-Property erstellen, z.B. "Sizeposition_800_400"
put kSizePrefix & tActualSize into tSizeProperty
## Speicherung der aktuellen Position und Größe jedes Bedienelements /Control)
repeat with i = 1 to the number of controls of the current card
set the tSizeProperty of control i to the rect of control i
end repeat
end save_control_positions
-------------------------------------------------------------------
command set_control_positions pSize
put kSizePrefix & pSize into tSizeProperty
put the tSizeProperty of control 1 into tNewSize
if tNewSize is empty then
put the customKeys of control 1 into tCustomProperties
filter lines of tCustomProperties with kSizePrefix & "*"
replace kSizePrefix with empty in tCustomProperties
if tCustomProperties is empty then
answer "Keine Auflösungen verfügbar!"
exit set_control_positions
else
put empty into tButtonListe
repeat for each line i in tCustomProperties
put quote & i & quote & " OR " after tButtonListe
end repeat
put "Cancel" after tButtonListe
put "answer " & quote & "Folgende Auflösungen sind verfügbar:" & quote && " with" && tButtonListe into tAuswahl
do tAuswahl
if it is "Cancel" then
exit set_control_positions
else
set_control_positions it
end if
end if
else
put the loc of this stack into tStackLoc
set itemdelimiter to "_"
set the width of this stack to item 1 of pSize
set the height of this stack to item 2 of pSize
set the loc of this stack to tStackLoc
repeat with i = 1 to the number of controls of the current card
set the rect of control i to the tSizeProperty of control i
end repeat
end if
end set_control_positions
-------------------------------------------------------------------
du scheinst das Problem mit unterschiedlichen Auflöungen bei mobilen Endgeräten zu haben.
Da vor allem bei Android sehr viele verschiedene Geräte unterwegs sind, wöre es zu mühsam, alle möglichen Auflösungen und deren passendes Arragement einzustellen.
Ich empfehle die Verwendung des Geometry-Tools, bei dem sich für die Controls festlegen lässt, wie sie ihre Position und Größe abhängig von der Größe des Stacks und anderer Controls verändern sollen. In früheren Versionen soll das nicht immer funktioniert haben, aber ich habe letztens gute Erfahrungen damit gemacht.
Wenn man in den OpenCard-Handler aller Karten den Befehl "revUpdateGeometry" einfügt, werden die Positionen und Größen entsprechend eingestellt.