Erstellt ein Label für die GUI.
GUICtrlCreateLabel ( "text", left, top [, width [, height [, style [, exStyle]]]] )
| text | Der Beschriftungstext. |
| left | Die linke Seite des Controls. Wird -1 verwendet, dann wird left mit Hilfe von GUICoordMode berechnet. |
| top | Die Oberkante des Controls. Wird -1 verwendet, dann wird top mit Hilfe von GUICoordMode berechnet. |
| width | [optional] Die Breite des Controls (Standard: Länge des Textes). |
| height | [optional] Die Höhe des Controls (Standard: Höhe des Textes). |
| style | [optional] Legt den Stil des Controls fest. Siehe Anhang GUI-Stile für Controls. Standard ( -1) : Keine Erzwungene Stile : $SS_NOTIFY, $SS_LEFT |
| exStyle | [optional] Legt den erweiterten Stil des Controls fest. Siehe Tabelle der erweiterten Stile. |
| Erfolg: | Gibt die Identifikationsnummer (Control-ID) des neuen Controls zurück. |
| Fehler: | Gibt 0 zurück. |
#include <GUIConstantsEx.au3>
Example()
Func Example()
Local $widthCell, $msg, $iOldOpt
GUICreate("Mein GUI") ; Erstellt ein GUI-Fenster welches mittig ausgerichtet wird
GUISetHelp("notepad.exe") ; Startet den Editor, wenn F1 gedrückt wird
$iOldOpt = Opt("GUICoordMode", 2)
$widthCell = 80
GUICtrlCreateLabel("Zeile 1, Zelle 1", 10, 30, $widthCell) ; Erste Zelle, Breite 80
GUICtrlCreateLabel("Zeile 2, Zelle 1", -1, 0) ; Nächste Zeile
GUICtrlCreateLabel("Zeile 3, Zelle 2", 0, 0) ; Nächste Zeile und nächste Zelle
GUICtrlCreateLabel("Zeile 3, Zelle 3", 0, -1) ; Nächste Zelle, gleiche Zeile
GUICtrlCreateLabel("Zeile 4, Zelle 1", -3 * $widthCell, 0) ; Nächste Zeile, Zelle 1
GUISetState() ; Zeigt eine leere Dialogbox an
; GUI starten, bis der Dialog beendet wird
Do
$msg = GUIGetMsg()
Until $msg = $GUI_EVENT_CLOSE
$iOldOpt = Opt("GUICoordMode", $iOldOpt)
EndFunc ;==>Example