Ich bin Neuling in Autoit und habe das Problem in einer Liste Scrollbars einzufügen und die Spaltenbreiten anzugeben
Mein Code
$List = _GUICtrlListBox_Create($GUI, "Belegung INIT-Datei", 10, 2, 580, 400)
Func List_Fill()
Local $sFilePath, $oExcel, $sCellValue
Local $i, $j, $s1
$sFilePath = @ScriptDir & "\INIT.xlsx"
$oExcel = _ExcelBookOpen($sFilePath,0,true)
If @error = 1 Then
MsgBox(0, "Error!", "Unable to Create the Excel Object")
Exit
ElseIf @error = 2 Then
$sFilePath = @ScriptDir & "\INIT.xls"
$oExcel = _ExcelBookOpen($sFilePath,1,true)
If @error = 1 Then
MsgBox(0, "Error!", "Unable to Create the Excel Object")
Exit
ElseIf @error = 2 Then
MsgBox(0, "Error!", "File does not exist")
Exit
EndIf
EndIf
$View = _GUICtrlListView_Create($List, "Col 0|Col 1|Col 2", 10, 20, 580, 400 )
$i = 1
$j = 0
$s1 = _ExcelReadCell($oExcel, $i, 1)
If $s1 = "" Or $s1 = " " Then
Msgbox(0, "Tabelle leer", "es sind keine Einträge in der Init-Tabelle")
Exit
EndIf
while $s1 <> "" And $s1 <> " "
;msgbox(0," ",_ExcelReadCell($oExcel, $i, 2))
_GUICtrlListView_AddItem($View, _ExcelReadCell($oExcel, $i, 1), $j)
_GUICtrlListView_AddSubItem($View, $j, _ExcelReadCell($oExcel, $i, 2), 1)
_GUICtrlListView_AddSubItem($View, $j, _ExcelReadCell($oExcel, $i, 3), 2)
$i = $i + 1
$j = $j + 1
$s1 = _ExcelReadCell($oExcel, $i, 1)
WEnd