Darstellungsfehler im GUI

  • Guten Tag,

    nachdem ich lange im englischen Forum rumgekrochen bin, bin ich froh jetzt dieses Forum gefunden zu haben. :)
    Nun muss ich natürlich gleich mal testen, wie gut ihr seid. ;)

    Und zwar habe ich ein Listview im mein GUI gebastelt und darunter 2 inputs 2 edits und 1 combo. Das Listview enthält ca. 1000 items und wird völlig korrekt dargesteltt.
    Das Problem ist, das die input, edits und vorallem die Combo so grafisch verbuggt sind, dass man kaum was erkennt. Der Border der Objekte fehlen einfach und auch der weise Hintergrund ist nur sichtbar, wenn der focus auf dem Element ist. Bei der Combo ist das besonders übel, weil erst wenn man den Pfeil drückt, sieht man die Combo. Nur sieht man den Pfeil auch nicht, man muss also raten wo er sein könnte.

    Hoffe ihr könnt mir da helfen, Vielen Danke schon mal.

    PS: Habe im Forum gefunden, dass "$WS_EX_COMPIOSITED" helfen soll gegen flackern. Hab es mal versucht, und tatsächlich sind jetzt meine Edits und Inputs richtig dargestellt, ABER das listview ist jetzt völlig weg und das gesamte GUI ist jetzt nicht mehr anklickbar, bzw. es wirkt, als wäre das system damit völlig überlastet. Wenn man zuviel drauf rumklickt, stürzt die ganze Anwendung ab.

  • Das Problem ist nur, dass es auch noch aus mehren import dateien besteht. Und diese Dateien enthalten sensible daten, hab jetzt mal Dummys dafür angelegt.
    Die Dateien aus der "Dummy.rar" muss man einfach ins gleiche Verzeichnis wie die tool.au3 entpacken.

    Hier auch nochmal der Quellcode der au3, vllt sieht "mans" ja auch da, was ich übersehen habe:

    Spoiler anzeigen
    [autoit]

    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #include <GUIConstants.au3>
    #include <EditConstants.au3>
    #include <StaticConstants.au3>
    #include <GuiScrollBars.au3>
    #include <ScrollBarConstants.au3>
    #include <GuiListView.au3>
    #Include <Array.au3>
    #include <GUIComboBox.au3>
    #include <Constants.au3>
    Global Const $WS_EX_COMPOSITED = 0x2000000

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

    Dim $listview, $citems[15], $clabel[15],$relations[15][3]

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

    Dim $ini_relations = IniReadSection ( "settings.ini", "relations" )

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

    IF @error=1 Then
    MsgBox(0,"Fehler", "Fehler beim einlesen der Einstellungen.")
    exit
    endif

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

    for $i = 1 to $ini_relations[0][0]

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

    $myfile = FileRead($ini_relations[$i][1])

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

    $myfile = StringSplit($myfile,@CRLF)

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

    Dim $myfile_ids[$myfile[0]]
    Dim $myfile_vars[$myfile[0]]

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

    for $t = 1 to $myfile[0]-1
    $tmp_array = StringExplode($myfile[$t],"#")

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

    $myfile_ids[$t-1] = $tmp_array[1]
    $myfile_vars[$t-1] = $tmp_array[2]
    next

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

    $varname1 = "$rel_att_ids__"&$i
    $varname2 = "$rel_att_vars__"&$i
    Assign($varname1,$myfile_ids)
    Assign($varname2,$myfile_vars)

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

    $relations[$ini_relations[$i][0]][1] = $varname1
    $relations[$ini_relations[$i][0]][2] = $varname2
    next

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

    main()

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

    func get_relation_array_list($field,$as = 0)

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

    $tmp_var_2 = eval($relations[$field][2])
    $tmp_var_1 = eval($relations[$field][1])

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

    if $as = 0 then
    return eval($tmp_var_2[$i])
    else
    return _ArrayToString($tmp_var_2)
    endif

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

    endfunc

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

    Func main()
    Local $msg

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

    $mainframe = GUICreate("Tool",500,500,0,0,BitOr($GUI_SS_DEFAULT_GUI, $WS_SIZEBOX,$WS_MAXIMIZEBOX))
    $listview = GUICtrlCreateListView("ID|x1|x2|x3|x4|x5|x6|x7|x8|x9|x10|x11|x12|x13|x14",0,0, 500, 300)
    _GUICtrlListView_SetExtendedListViewStyle ($listview, BitOR($LVS_EX_FULLROWSELECT,$LVS_EX_REGIONAL))
    GUICtrlSetResizing($listview, $GUI_DOCKLEFT+ $GUI_DOCKBOTTOM + $GUI_DOCKTOP)

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

    readfile()

    GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY")

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

    ;For $r = 0 to 14
    ;$citems[$r] = GUICtrlCreateEdit( "", 110*$r,400, 100, 18)
    ;GUICtrlSetData($citems[$r], "Edit Nr: "&$r, 1)
    ;GUICtrlSetResizing($citems[$r], BitOr($GUI_DOCKSIZE,$GUI_DOCKLEFT))
    ;next

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

    $width = 0
    $citems[3] = GUICtrlCreateEdit( "", $width,335, 300, 75)
    $clabel[3] = GUICtrlCreateLabel( "Name", $width,310, 300, 75)
    $width = $width + 300 + 10
    $citems[4] = GUICtrlCreateEdit( "", $width,335, 300, 75)
    $clabel[4] = GUICtrlCreateLabel( "Beschreibung", $width,310, 300, 75)
    $width = $width + 300 + 10
    $citems[5] = GUICtrlCreateEdit( "", $width,335, 300, 75)
    $clabel[5] = GUICtrlCreateLabel( "Langbeschreibung", $width,310, 300, 75)
    $width = $width + 300 + 10

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

    $width = 0
    $citems[6] = GUICtrlCreateCombo("", $width, 435,150,20,$CBS_DROPDOWNLIST)
    GUICtrlSetData($citems[6],get_relation_array_list(6,1),3)
    $clabel[6] = GUICtrlCreateLabel( "Mengeneinheit", $width,410, 150, 75)
    $width = $width + 150 + 10
    $citems[7] = GUICtrlCreateCombo("", $width, 435,150,20,$CBS_DROPDOWNLIST)
    GUICtrlSetData($citems[7],get_relation_array_list(7,1),3)
    $clabel[7] = GUICtrlCreateLabel( "Spezialkategorie", $width,410, 150, 75)

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

    For $r = 0 to 7
    GUICtrlSetResizing($citems[$r], $GUI_DOCKLEFT + $GUI_DOCKBOTTOM + $GUI_DOCKSIZE)
    GUICtrlSetResizing($clabel[$r], $GUI_DOCKLEFT + $GUI_DOCKBOTTOM + $GUI_DOCKSIZE)
    next

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

    GUISetState(@SW_SHOW)

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

    Do
    $msg = GUIGetMsg()

    Select
    Case $msg = $listview
    MsgBox(0, "listview", "clicked=" & GUICtrlGetState($listview), 2)
    EndSelect
    Until $msg = $GUI_EVENT_CLOSE
    EndFunc

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

    Func readfile()

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

    $file = FileOpen("export__main.nosv", 0)

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

    ; Check if file opened for reading OK
    If $file = -1 Then
    MsgBox(0, "Error", "Unable to open file.")
    Exit
    EndIf

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

    $count = 0
    Local $line_array[100][41]
    ; Read in lines of text until the EOF is reached
    While 1
    $line = FileReadLine($file)
    If @error = -1 Then ExitLoop
    If $count = 100 Then ExitLoop
    $tmp = StringExplode($line, "#" )

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

    For $r = 1 to 14
    $line_array[$count][$r-1] = $tmp[$r]
    Next

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

    $count = $count+1
    Wend

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

    FileClose($file)

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

    ;$rows = UBound($line_array)
    ;$cols = UBound($line_array, 2)
    ;$dims = UBound($line_array, 0)

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

    ;MsgBox(0, "The " & $dims & "-dimensional array has", $rows & " rows, " & $cols & " columns")

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

    ;Display $line_array's contents

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

    For $r = 0 to UBound($line_array,1) - 1

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

    $listitem = ""
    For $c = 0 to 14
    ;GUICtrlCreateInput($line_array[$r][$c], $c*100, $r*20,100, 20)
    $listitem = $listitem&$line_array[$r][$c]&"|"
    Next

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

    $listitem = StringLeft($listitem,StringLen($listitem)-1)
    GUICtrlCreateListViewItem($listitem, $listview)
    ;$item2 = GUICtrlCreateListViewItem("item1|col12|col13", $listview)
    Next

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

    EndFunc

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

    Func StringExplode($sString, $sDelimiter, $sLimit = 0)
    If $sLimit > 0 Then
    ;Replace delimiter with NULL character using given limit
    $sString = StringReplace($sString,$sDelimiter,Chr(0),$sLimit)

    ;Split on NULL character, this will leave the remainder in the last element
    $sDelimiter = Chr(0)
    ElseIf $sLimit < 0 Then
    ;Find delimiter occurence from right-to-left
    $iIndex = StringInStr($sString,$sDelimiter,0,$sLimit)

    If $iIndex Then
    ;Split on left side of string only
    $sString = StringLeft($sString,$iIndex-1)
    EndIf
    EndIf

    Return StringSplit($sString,$sDelimiter,1)
    EndFunc

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

    func handleitemclick($index)
    $item_array = _GUICtrlListView_GetItemTextArray($listview,$index)

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

    _GUICtrlComboBox_SetCurSel($citems[6],$item_array[6]-1)
    _GUICtrlComboBox_SetCurSel($citems[7],$item_array[15]-1)

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

    for $r = 3 to 14
    if $r = 6 OR $r = 7 then
    for $i = 0 to UBound($relations)-1
    if $relations[$i][0] = $r then

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

    endif
    next
    else
    GUICtrlSetData($citems[$r], StringReplace($item_array[$r],"<BR>",@CRLF))
    endif
    next

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

    endfunc

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

    ;-----------------------------------------------------------------

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

    Func WM_NOTIFY($hWnd, $iMsg, $iwParam, $ilParam)
    Local $hWndFrom, $iIDFrom, $iCode, $tNMHDR, $hWndListView
    $hWndListView = $listview
    If Not IsHWnd($listview) Then $hWndListView = GUICtrlGetHandle($listview)

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

    $tNMHDR = DllStructCreate($tagNMHDR, $ilParam)
    $hWndFrom = HWnd(DllStructGetData($tNMHDR, "hWndFrom"))
    $iIDFrom = DllStructGetData($tNMHDR, "IDFrom")
    $iCode = DllStructGetData($tNMHDR, "Code")
    Switch $hWndFrom
    Case $hWndListView
    Switch $iCode
    Case $LVN_COLUMNCLICK; A column was clicked
    Local $tInfo = DllStructCreate($tagNMLISTVIEW, $ilParam)
    _DebugPrint("$LVN_COLUMNCLICK" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _
    "-->IDFrom:" & @TAB & $iIDFrom & @LF & _
    "-->Code:" & @TAB & $iCode & @LF & _
    "-->Item:" & @TAB & DllStructGetData($tInfo, "Item") & @LF & _
    "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @LF & _
    "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @LF & _
    "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @LF & _
    "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @LF & _
    "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @LF & _
    "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @LF & _
    "-->Param:" & @TAB & DllStructGetData($tInfo, "Param"))
    Case $LVN_KEYDOWN; A key has been pressed
    Local $tInfo = DllStructCreate($tagNMLVKEYDOWN, $ilParam)
    _DebugPrint("$LVN_KEYDOWN" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _
    "-->IDFrom:" & @TAB & $iIDFrom & @LF & _
    "-->Code:" & @TAB & $iCode & @LF & _
    "-->VKey:" & @TAB & DllStructGetData($tInfo, "VKey") & @LF & _
    "-->Flags:" & @TAB & DllStructGetData($tInfo, "Flags"))
    Case $NM_CLICK; Sent by a list-view control when the user clicks an item with the left mouse button
    Local $tInfo = DllStructCreate($tagNMITEMACTIVATE, $ilParam)
    _DebugPrint("$NM_CLICK" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _
    "-->IDFrom:" & @TAB & $iIDFrom & @LF & _
    "-->Code:" & @TAB & $iCode & @LF & _
    "-->Index:" & @TAB & DllStructGetData($tInfo, "Index") & @LF & _
    "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @LF & _
    "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @LF & _
    "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @LF & _
    "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @LF & _
    "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @LF & _
    "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @LF & _
    "-->lParam:" & @TAB & DllStructGetData($tInfo, "lParam") & @LF & _
    "-->KeyFlags:" & @TAB & DllStructGetData($tInfo, "KeyFlags"))
    ; No return value
    Case $NM_DBLCLK; Sent by a list-view control when the user double-clicks an item with the left mouse button
    Local $tInfo = DllStructCreate($tagNMITEMACTIVATE, $ilParam)

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

    handleitemclick(DllStructGetData($tInfo, "Index"))

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

    _DebugPrint("$NM_DBLCLK" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _
    "-->IDFrom:" & @TAB & $iIDFrom & @LF & _
    "-->Code:" & @TAB & $iCode & @LF & _
    "-->Index:" & @TAB & DllStructGetData($tInfo, "Index") & @LF & _
    "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @LF & _
    "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @LF & _
    "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @LF & _
    "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @LF & _
    "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @LF & _
    "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @LF & _
    "-->lParam:" & @TAB & DllStructGetData($tInfo, "lParam") & @LF & _
    "-->KeyFlags:" & @TAB & DllStructGetData($tInfo, "KeyFlags"))
    Case $NM_KILLFOCUS; The control has lost the input focus
    _DebugPrint("$NM_KILLFOCUS" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _
    "-->IDFrom:" & @TAB & $iIDFrom & @LF & _
    "-->Code:" & @TAB & $iCode)
    Case $NM_RCLICK; Sent by a list-view control when the user clicks an item with the right mouse button
    Local $tInfo = DllStructCreate($tagNMITEMACTIVATE, $ilParam)
    _DebugPrint("$NM_RCLICK" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _
    "-->IDFrom:" & @TAB & $iIDFrom & @LF & _
    "-->Code:" & @TAB & $iCode & @LF & _
    "-->Index:" & @TAB & DllStructGetData($tInfo, "Index") & @LF & _
    "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @LF & _
    "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @LF & _
    "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @LF & _
    "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @LF & _
    "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @LF & _
    "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @LF & _
    "-->lParam:" & @TAB & DllStructGetData($tInfo, "lParam") & @LF & _
    "-->KeyFlags:" & @TAB & DllStructGetData($tInfo, "KeyFlags"))
    Return 0; allow the default processing
    Case $NM_RDBLCLK; Sent by a list-view control when the user double-clicks an item with the right mouse button
    Local $tInfo = DllStructCreate($tagNMITEMACTIVATE, $ilParam)
    _DebugPrint("$NM_RDBLCLK" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _
    "-->IDFrom:" & @TAB & $iIDFrom & @LF & _
    "-->Code:" & @TAB & $iCode & @LF & _
    "-->Index:" & @TAB & DllStructGetData($tInfo, "Index") & @LF & _
    "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @LF & _
    "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @LF & _
    "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @LF & _
    "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @LF & _
    "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @LF & _
    "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @LF & _
    "-->lParam:" & @TAB & DllStructGetData($tInfo, "lParam") & @LF & _
    "-->KeyFlags:" & @TAB & DllStructGetData($tInfo, "KeyFlags"))
    ; No return value
    Case $NM_RETURN; The control has the input focus and that the user has pressed the ENTER key
    _DebugPrint("$NM_RETURN" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _
    "-->IDFrom:" & @TAB & $iIDFrom & @LF & _
    "-->Code:" & @TAB & $iCode)
    ; No return value
    Case $NM_SETFOCUS; The control has received the input focus
    _DebugPrint("$NM_SETFOCUS" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _
    "-->IDFrom:" & @TAB & $iIDFrom & @LF & _
    "-->Code:" & @TAB & $iCode)
    ; No return value
    EndSwitch
    EndSwitch
    Return $GUI_RUNDEFMSG
    EndFunc ;==>WM_NOTIFY

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

    func _DebugPrint($s_text, $line = @ScriptLineNumber)
    endfunc

    [/autoit]

    2 Mal editiert, zuletzt von s0urce (28. Januar 2009 um 09:45)

    • Offizieller Beitrag

    Ohne weiter in den Code zu schauen fällt mir auf, dass du alle Ereignisse (des ListView) per DebugPrint ausgeben läßt. Das ist zur Fehlersuche sinnvoll, führt möglicherweise aber zu dem von dir skizzierten Problem. Da du nur $NM_DBLCLK auswertest, kommentiere doch alle anderen Ereignisse in WM_NOTIFY mal aus.

  • [autoit]

    $citems[3] = GUICtrlCreateEdit("", $width, 335, 300, 75)
    $clabel[3] = GUICtrlCreateLabel("Name", $width, 310, 300, 20)
    $width = $width + 300 + 10
    $citems[4] = GUICtrlCreateEdit("", $width, 335, 300, 75)
    $clabel[4] = GUICtrlCreateLabel("Beschreibung", $width, 310, 300, 20)
    $width = $width + 300 + 10
    $citems[5] = GUICtrlCreateEdit("", $width, 335, 300, 75)
    $clabel[5] = GUICtrlCreateLabel("Langbeschreibung", $width, 310, 300, 20)
    $width = $width + 300 + 10

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

    $width = 0
    $citems[6] = GUICtrlCreateCombo("", $width, 435, 150, 20, $CBS_DROPDOWNLIST)
    GUICtrlSetData($citems[6], get_relation_array_list(6, 1), 3)
    $clabel[6] = GUICtrlCreateLabel("Mengeneinheit", $width, 410, 150, 20)
    $width = $width + 150 + 10
    $citems[7] = GUICtrlCreateCombo("", $width, 435, 150, 20, $CBS_DROPDOWNLIST)
    GUICtrlSetData($citems[7], get_relation_array_list(7, 1), 3)
    $clabel[7] = GUICtrlCreateLabel("Spezialkategorie", $width, 410, 150, 20)

    [/autoit]


    Immer nur den Mund soweit aufmachen wie man was zu sagen hat :P

  • @BugFix: debugprint ist zwar bei mir eine leere Funktion, aber habs jetzt mal rausgenommen, denn selbst die Aufrufe der leeren Funktion schlucken bestimmt leistung, danke.

    @eukalyptus: Vielen dank, das wars tatsächlich, dachte nicht, dass sich eine Überlagerung so auswirkt.

    @mehrsolala: Kann dir leider nicht folgen? Was meinst du damit?


    Nochmal auf das Thema mit dem flackern beim "resizen" zurück zu kommen. Gibt es jetzt dafür eine saubere Möglichkeit dies zu verhindern, weil die Variante die ich oben beschrieben hatte ging ja bei mir nicht. Danke.

    Und dann nochmal ne Frage am Rande, wenn ich schon grad so kompetente Leute um mich hab: Kann man in AutoIt eigtl. wirklick nicht einen Array einem Array zuweisen?
    Ein Beispiel:

    [autoit]

    Dim $array[10]
    $array[1] = StringSplit("x,x,x",",")
    MsgBox(0,"any",$array[1][2])

    [/autoit]

    Gibt bei mir einen Fehler zurück, von wegen "Dimension exceeded oder so".

    Bin das halt aus anderen Skirptsprachen gewohnt wie PHP oder Javascript.

    7 Mal editiert, zuletzt von s0urce (28. Januar 2009 um 11:51)

  • das was eukalyptus schon geschrieben hat (hätte mal aktualisieren sollen :whistling: ) deine Labels gingen über 3 ¾ Zeilen (obwohl du nur eine gebraucht hättest) und lagen damit über den anderen Controls (da jeweils später erzeugt)

    • Offizieller Beitrag


    Das ist für AutoIt kein Problem, du kannst einem Array als Element wiederum ein Array zuweisen. ABER: Das Auslesen ist dann zweistufig.
    Dein Bsp.:

    [autoit]


    Dim $array[10]
    $array[1] = StringSplit("x,x,x",",")
    Local $tmp = $array[1]
    MsgBox(0,$tmp[0] & "Elemente",$tmp[1] & ', ' & $tmp[2] & ', ' & $tmp[3])

    [/autoit]

    Ich habe für diesen Fall eigene Funktionen erstellt, findest du hier: https://autoit.de/index.php?page…21161#post21161
    _SubArray2DGetEntry()
    _SubArray2DSetEntry() und
    _ArrayMultiDisplay() --> in Post 24

  • Vielen Dank für diese Erklärung und die Links, war jetzt ne Woche krank, deswegen hab ichs grad erst gesehen.