[COLOR=green]' Damit das Rechteck immer innerhalb des Displays bleibt, muss folgendes gemacht werden: [/COLOR]
[COLOR=green]'[/COLOR]
[COLOR=green]' 1. Höhe Rechteck ab Oberkante Rechteck auf 0 setzen[/COLOR]
[COLOR=green]'[/COLOR]
[COLOR=green]' 2. Abstand zwischen Oberkante Display und Oberkante Rechteck auf neuen Wert setzen[/COLOR]
[COLOR=green]'[/COLOR]
[COLOR=green]' 3. Höhe Rechteck ab Oberkante Rechteck auf neuen Wert setzen[/COLOR]
[COLOR=green]'[/COLOR]
[COLOR=green]'[/COLOR]
[COLOR=green]' Beispiel ohne Höhe Rechteck auf 0 setzen:[/COLOR]
[COLOR=#008000]'[/COLOR]
[COLOR=green]' OP270 6 Zoll - Display = 320 X 240 (Breite x Höhe)[/COLOR]
[COLOR=green]'[/COLOR]
[COLOR=green]' Rechteck_Hoehe = 100[/COLOR]
[COLOR=green]' .Top = 200 - 100 = 100[/COLOR]
[COLOR=green]' .Height = 100[/COLOR]
[COLOR=green]'[/COLOR]
[COLOR=green]' Rechteck_Hoehe = 20[/COLOR]
[COLOR=green]' .Top = 200 - 20 = 180[/COLOR]
[COLOR=green]' [/COLOR]
[COLOR=green]' .Top = 180 + .Height = 100 = 280 > Display Höhe 240[/COLOR]
[COLOR=green]'[/COLOR]
[COLOR=green]' Skript wird mit einer Fehlermeldung gestoppt[/COLOR]
[COLOR=black]HmiRuntime.Screens([COLOR=sienna]"Startbild"[/COLOR]).ScreenItems([COLOR=sienna]"Rechteck[/COLOR][COLOR=sienna]"[/COLOR]).Height = 0[/COLOR]
[COLOR=black]HmiRuntime.Screens[COLOR=sienna]("Startbild[/COLOR][COLOR=sienna]"[/COLOR]).ScreenItems([COLOR=sienna]"Rechteck[/COLOR][COLOR=sienna]"[/COLOR]).Top = 200 - SmartTags([COLOR=sienna]"Rechteck_Hoehe[/COLOR][COLOR=sienna]"[/COLOR])[/COLOR]
[COLOR=green][COLOR=black]HmiRuntime.Screens([COLOR=sienna]"[/COLOR][COLOR=sienna]Startbil[/COLOR][COLOR=sienna]d[/COLOR][COLOR=sienna]"[/COLOR]).ScreenItems([COLOR=sienna]"Rechteck[/COLOR][COLOR=sienna]"[/COLOR]).Height = SmartTags([COLOR=sienna]"Rechteck_Hoehe[/COLOR][COLOR=sienna]"[/COLOR])[/COLOR][/COLOR]