Hallo Zusammen,
ich habe eine Liste mit GUICtrlCreateList erstellt, der ich regelmäßig Daten sende.
Nun will ich die Liste so haben, dass sie automatisch vertikal gescrollt wird.
Gibt es da eine Möglichkeit?
Vielen Dank
Hallo Zusammen,
ich habe eine Liste mit GUICtrlCreateList erstellt, der ich regelmäßig Daten sende.
Nun will ich die Liste so haben, dass sie automatisch vertikal gescrollt wird.
Gibt es da eine Möglichkeit?
Vielen Dank
Hallo morphL,
hier ein Skript von Raupi:
;http://www.autoit.de/index.php?page…71432#post71432 Raupi
#include <GUIConstantsEx.au3>
#include <ListBoxConstants.au3>
#include <WindowsConstants.au3>
#include <GuiListBox.au3>
Global $Count, $oldCount = 0
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 633, 447, 193, 125)
$List1 = GUICtrlCreateList("", 80, 32, 369, 300)
_GUICtrlListBox_InsertString($List1, "Die ist ein Test ", -1)
GUICtrlSetStyle($List1, $LBS_NOSEL)
GUISetState(@SW_SHOW)
$Button1 = GUICtrlCreateButton("Random Einträge Hinzufügen", 10, 400, 150, 17)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
$iRand = Random(1, 10, 1)
For $i = 1 To $iRand
_GUICtrlListBox_InsertString($List1, "Random String Nr. " & $i, -1)
Next
EndSwitch
$Count = _GUICtrlListBox_GetCount($List1) - 1
If $Count <> $oldCount Then
_GUICtrlListBox_SetCurSel($List1, _GUICtrlListBox_GetCount($List1) - 1)
$oldCount = $Count
_FileWrite()
EndIf
WEnd
Func _FileWrite()
$File = FileOpen(@ScriptDir & "\Test.log", 2)
For $i = 0 To _GUICtrlListBox_GetCount($List1) - 1
FileWriteLine($File, _GUICtrlListBox_GetText($List1, $i))
;~ msgbox (0,"",_GUICtrlListBox_GetText($List1, $i))
Next
FileClose($File)
EndFunc ;==>_FileWrite
mfg (Auto)Bert