Logman Posted March 6, 2008 Posted March 6, 2008 (edited) Hi, I have question about ListView sorting with colorized rows with "Err" value in colD. How set font color for this rows after click on column header? Thanks Part of my code: expandcollapse popup#include <GuiListView.au3> Global $MyArr[10] ; dump arr (2D arr), for test not 2D _dumpArr_for_test_only() ; GUI GUICreate("Test",220, 250) $list_view = GUICtrlCreateListView ("colA|colB|colC|colD",10, 10, 200, 200) GUICtrlSendMsg($list_view, $LVM_SETEXTENDEDLISTVIEWSTYLE, $LVS_EX_GRIDLINES, $LVS_EX_GRIDLINES) ; create rows For $i = 0 To UBound($MyArr) - 1 GUICtrlCreateListViewItem($MyArr[$i], $list_view) If StringInStr($MyArr[$i],"Err") Then GUICtrlSetColor (-1, 0xFF0000) Next Dim $A_DESCENDING[_GUICtrlListView_GetColumnCount ($list_view)] GUISetState() Do $nMsg = GUIGetMsg () Select Case $nMsg = $list_view _GUICtrlListView_SimpleSort($list_view, $A_DESCENDING, GUICtrlGetState($list_view)) Case Else ; nothing EndSelect Until $nMsg = $GUI_EVENT_CLOSE ; for help only Func _dumpArr_for_test_only() Local $bTmp = true, $sTmp For $i = 0 To UBound($MyArr) - 1 Switch $i Case 2, 5, 7 $sTmp = "Err" Case Else $sTmp = "OK" EndSwitch $bTmp = Not $bTmp $MyArr[$i] = $i & "|" & UBound($MyArr)-$i-1 & "|" & $bTmp & "|" & $sTmp Next EndFunc Edited March 6, 2008 by Logman
Logman Posted March 6, 2008 Author Posted March 6, 2008 I'm found this method for my problem solution:#475929Great!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now