Jump to content
Sign in to follow this  

Reload ListView Flicker

Recommended Posts


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()
        $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)
EndFunc  ;==>_loadUsersListbox

Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.