darzanmihai Posted June 2, 2010 Share Posted June 2, 2010 Hi I havea listview holding about 100 items, that needs to be updated at user demand. the problem is that when I update the listview, it flickers and this is very annoying. How could I update the listview without makeing it flicker? This is the function I use to update the listview: expandcollapse popupFunc Refresh_Cons_List($ListView) _GUICtrlListView_BeginUpdate($ListView) _GUICtrlListView_DeleteAllItems($ListView) Local $aResult = "", $iRows = "", $iColumns = "" Local $aResult_1 = "", $iRows_1 = "", $iColumns_1 = "" _SQLite_GetTable2d($db, "select * from consumatori", $aResult, $iRows, $iColumns) $vizati_state = GUICtrlRead($Checkbox_vizati) If UBound($aResult) > 1 Then For $i = 1 To UBound($aResult) - 1 ;ID|Consumator|Distribuitor|Inc.Con.Distrib.|Fin.Con.Distrib.|Inc.Con.Furniz.|Fin.Con.Furniz. _SQLite_GetTable2d($db, "select * from fosticonsumatori where id_c='" & $aResult[$i][0] & "';", $aResult_1, $iRows_1, $iColumns_1) If UBound($aResult_1)<=1 Then $fin_distrib = $aResult[$i][4] $fin_furnizare = $aResult[$i][6] $now = @YEAR & "/" & @MON & "/" & @MDAY $d_dif_distrib = _DateDiff("d", $now, $fin_distrib);yyyy/mm/dd $d_dif_furniz = _DateDiff("d", $now, $fin_furnizare) If $vizati_state = $GUI_CHECKED Then If $d_dif_distrib <= $day_diff Or $d_dif_furniz <= $day_diff Then GUICtrlCreateListViewItem($aResult[$i][0] & "|" & $aResult[$i][1] & "|" & $aResult[$i][2] & "|" & $aResult[$i][3] & _ "|" & $aResult[$i][4] & "|" & $aResult[$i][5] & "|" & $aResult[$i][6], $ListView) GUICtrlSetBkColor(-1, 0xb9b6b3) GUICtrlSetColor(-1, 0xff0000) EndIf Else GUICtrlCreateListViewItem($aResult[$i][0] & "|" & $aResult[$i][1] & "|" & $aResult[$i][2] & "|" & $aResult[$i][3] & _ "|" & $aResult[$i][4] & "|" & $aResult[$i][5] & "|" & $aResult[$i][6], $ListView) GUICtrlSetBkColor(-1, 0xb9b6b3) If $d_dif_distrib <= $day_diff Or $d_dif_furniz <= $day_diff Then GUICtrlSetColor(-1, 0xff0000) EndIf EndIf $aResult_1 = "" $iRows_1 = "" $iColumns_1 = "" Next EndIf _GUICtrlListView_SortItems($ListView, 1) _GUICtrlListView_SortItems($ListView, 1) _GUICtrlListView_EndUpdate($ListView) $aResult = "" $iRows = "" $iColumns = "" EndFunc ;==>Refresh_Cons_List I do not like stupid and idiot people that write idiot things...If you are one, do not write. Link to comment Share on other sites More sharing options...
evilertoaster Posted June 2, 2010 Share Posted June 2, 2010 Have you looked at any of these posts?http://www.autoitscript.com/forum/index.php?showtopic=96782http://www.autoitscript.com/forum/index.php?showtopic=91093http://www.autoitscript.com/forum/index.php?showtopic=71746 Link to comment Share on other sites More sharing options...
darzanmihai Posted June 4, 2010 Author Share Posted June 4, 2010 Have you looked at any of these posts?http://www.autoitscript.com/forum/index.php?showtopic=96782http://www.autoitscript.com/forum/index.php?showtopic=91093http://www.autoitscript.com/forum/index.php?showtopic=71746Thx for replyThe second link is usefull but is very complicated to have 2 listviews for each listview I have....and I have many listviews in my script...Isn't there any other way?Thx again I do not like stupid and idiot people that write idiot things...If you are one, do not write. Link to comment Share on other sites More sharing options...
darzanmihai Posted June 7, 2010 Author Share Posted June 7, 2010 Someone? I do not like stupid and idiot people that write idiot things...If you are one, do not write. Link to comment Share on other sites More sharing options...
darzanmihai Posted June 9, 2010 Author Share Posted June 9, 2010 Is there someone who can help me? I do not like stupid and idiot people that write idiot things...If you are one, do not write. Link to comment Share on other sites More sharing options...
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