Listviewitems mit Chechboxen

  • Ich kriegs nicht hin :P

    Hier mein Code:

    Spoiler anzeigen
    [autoit]

    ...

    [/autoit] [autoit][/autoit] [autoit]

    $listview = GUICtrlCreateListView("Dateiname|Größe|Downloads|Letzter Download",10,45,780,550)

    [/autoit] [autoit][/autoit] [autoit]

    ...

    [/autoit] [autoit][/autoit] [autoit]

    ;_ArrayDisplay($array_files)
    Local $item[Ubound($array_files)]
    For $f = 1 To $array_dateien[0]
    $item[$f] = GUICtrlCreateListViewItem($array_files[$f][1]&"|"&$array_files[$f][3]&"|"&$array_files[$f][2]&"|"&$array_files[$f][4],$listview)
    Next

    [/autoit] [autoit][/autoit] [autoit]

    ....

    [/autoit]

    Vielleicht hats schon jemand gemerkt. Ich bin am Basteln von einem Rapidshare Account Manager.

    Einmal editiert, zuletzt von Taek (12. August 2008 um 21:52)

  • Spoiler anzeigen


    Ich hab <GUIConstantsEx.au3> und <GUIConstants.au3> included, hilft auch nix. :(

    • Offizieller Beitrag
    Spoiler anzeigen
    [autoit]

    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #include <ListViewConstants.au3>

    [/autoit] [autoit][/autoit] [autoit]

    Opt('MustDeclareVars', 1)

    [/autoit] [autoit][/autoit] [autoit]

    Example()

    [/autoit] [autoit][/autoit] [autoit]

    Func Example()
    Local $listview, $button, $item1, $item2, $item3, $input1, $msg

    GUICreate("listview items", 220, 250, 100, 200, -1, $WS_EX_ACCEPTFILES)
    GUISetBkColor(0x00E0FFFF) ; will change background color

    [/autoit] [autoit][/autoit] [autoit]

    $listview = GUICtrlCreateListView("col1 |col2|col3 ", 10, 10, 200, 150, -1 ,$LVS_EX_CHECKBOXES);,$LVS_SORTDESCENDING)
    $button = GUICtrlCreateButton("Value?", 75, 170, 70, 20)
    $item1 = GUICtrlCreateListViewItem("item2|col22|col23", $listview)
    $item2 = GUICtrlCreateListViewItem("item1|col12|col13", $listview)
    $item3 = GUICtrlCreateListViewItem("item3|col32|col33", $listview)
    $input1 = GUICtrlCreateInput("", 20, 200, 150)
    GUICtrlSetState(-1, $GUI_DROPACCEPTED) ; to allow drag and dropping
    GUISetState()
    GUICtrlSetData($item2, "ITEM1")
    GUICtrlSetData($item3, "||COL33")
    GUICtrlDelete($item1)

    [/autoit] [autoit][/autoit] [autoit]

    Do
    $msg = GUIGetMsg()

    Select
    Case $msg = $button
    MsgBox(0, "listview item", GUICtrlRead(GUICtrlRead($listview)), 2)
    Case $msg = $listview
    MsgBox(0, "listview", "clicked=" & GUICtrlGetState($listview), 2)
    EndSelect
    Until $msg = $GUI_EVENT_CLOSE
    EndFunc ;==>Example

    [/autoit]