rabothole Posted May 23, 2008 Share Posted May 23, 2008 With a function like this i need to reload the whole ListView to get the new values from a database with this i empty the whole ListView and repopulate it like the code below, is there an easier way to do this or some solution to the flickering? Func _loadUsersListbox() _GUICtrlListView_DeleteAllItems($ListView1) $var = _Query($sql, "SELECT * FROM sup_users") With $var While Not .EOF $SQL_USR = .Fields("User_Name" ).value $SQL_EXT = .Fields("User_Ext" ).value $SQL_STA = .Fields("User_Status" ).value $SQL_NUM = .Fields("User_Number" ).value $listbox_sql_update = $SQL_USR & "|" & $SQL_EXT & "|" & $SQL_STA $item1 = GUICtrlCreateListViewItem($listbox_sql_update, $ListView1) If $SQL_STA = "LINE BUSY" Then GUICtrlSetBkColor($item1, $iListofflineColor) ElseIf $SQL_STA = "AVAILABLE" Then GUICtrlSetBkColor($item1, $iListreadyColor) EndIf .MoveNext WEnd EndWith EndFunc ;==>_loadUsersListbox Link to comment Share on other sites More sharing options...
Zedna Posted May 23, 2008 Share Posted May 23, 2008 GuiSetState(@SW_LOCK, $Form1) ; your stuff here ... GuiSetState(@SW_UNLOCK, $Form1) heyjude1971 1 Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
ChrisL Posted May 23, 2008 Share Posted May 23, 2008 Read this thread http://www.autoitscript.com/forum/index.ph...c=70227&hl= [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire 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