C# Sychronouse form update problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mikelis
    New Member
    • Jul 2007
    • 5

    #1

    C# Sychronouse form update problem

    I have a main form that displays another form which is populated with data from an XML file into a treeview. The treeview basically consists of URL links.

    On the form is a menu item that when selected, calls a method that
    traverses the tree and when it comes to a URL, calls a WebRequest.Crea te(URL) method to check whether the URL is active or not. If it is not, the icon
    next to the URL on the tree is replaced with a down arrow and the next URL in
    the tree is read and the process is repeated.

    The strange behavior however, is that the treeview is not updated with the
    down arrow icons UNTIL all the looping through the tree is finished - even
    though I set the node property with the new icon immediately after the URL is checked. I was expecting to watch the tree get updated as each URL is
    checked.

    Do I need to use a separate thread for this or something?

    Thanks. James
  • mikelis
    New Member
    • Jul 2007
    • 5

    #2
    I Solved it by using the this.Refresh() method.

    Comment

    Working...