Hier ein Beispiel-Code:
Spoiler anzeigen
#include <GUIConstants.au3>
Opt("GUIOnEventMode", True)
$hGUI = GUICreate("Font test", 100, 75)
$hGUILabel = GUICtrlCreateLabel("", 0, 0, 100, 25)
GUICtrlSetFont(-1, 12)
$hGUIInput = GUICtrlCreateInput("Auto", 0, 25, 100, 25)
GUICtrlSetFont(-1, 12)
$hGUIButton = GUICtrlCreateButton("Übernehmen", 0, 50, 100, 25)
GUICtrlSetFont(-1, 12)
GUICtrlSetOnEvent(-1, "_CopyText")
GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit")
GUISetState()
_CopyText()
[/autoit] [autoit][/autoit] [autoit]While 1
sleep(500)
WEnd
Func _CopyText()
GUICtrlSetData($hGUILabel, GUICtrlRead($hGUIInput))
EndFunc
Func _Exit()
Exit
EndFunc
Wie verändere ich dieses Code, um meinen Text innerhalb des Labels ($hGUILabel) zu verkleinern, sobald dieser sonst in die zweite Zeile reicht?
[ Um zu zeigen was ich meine: Gibt in das Input mal "Dieser Text ist zu lang" ein, und drückt "Übernehmen" ]
Danke