Jump to content

Recommended Posts

Posted (edited)

Is there a way to do a gui refresh, like when you hit F5 in explorer.

When i start my gui it read some settings from file/reg and adds then into a treeview, and some input/checkboxe's. What i now is trying to do is simulate / do a fake guiclose or somthing like that to get the gui to clear all info current in the gui and then re read the info, is there a way to do that.

All my items in the treeview is added by reading a filen and then pased into arrayers.

eg.

$i = 0
    $Lines = _FileCountLines("C:\Test.ini")
    If Not $lines = 0 Then
    ReDim $ahsLines[$Lines][2]
    $file = FileOpen("C:\Test.ini", 0)
    
    Do
        $i = $i + 1
    $line = FileReadLine($file, $i)
    $ahsLines[$i-1][0] = $line
    $ahsLines[$i-1][1] = GuiCtrlCreateTreeViewItem($line, $treeview)
    
Until $i = $lines

FileClose($file)

Woops Posted 2

Edited by Rex
Posted

:(

LOL Now you are thinking. :) Um.. I dont know of a way as I havent done extensive GUI stuff yet.

JS

<{POST_SNAPBACK}>

Current i do it the dirty way :(

FileDelete("C:\Test.ini")
FileWrite("C:\Test.ini", "")
Run(@ScriptDir & "\" & @scriptName)
Exit

It an't pretty but hey it works for now LOL.

The dammed thin about this way is that the whole gui close open thing looks totaly wrong :P

But until some one can help me do it some other and more pretty way im have to use it this way... :

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
×
×
  • Create New...