Sign in to follow this  
Followers 0
Ace08

cells in listview

1 post in this topic

Uhm hi guys its been a while since i've posted in this forum, so far my project is almost finished just want to ask another question, what i want to have is a listview that would look something like a spreadsheet with cells, i've searched for this and found a sample code but i cannot figure it out where the orginal coder put the codes i am looking for.

here is the code i've found:

#Include <File.au3>
#include<array.au3>

$Root=RecurseDir(FileSelectFolder("SELECT FOLDER",""))
ListDir($Root)
$Root=ArrayListDir(ListDir($Root))
_ArrayDisplay($Root)
Exit

Func RecurseDir($directory)
    local $DirList
    $DirList = _FileListToArray($directory,"*.*", 2)
    dim $DirTemp[2]
    $DirTemp[0]=$directory
    if UBound($DirList)>1 Then
        for $i=1 to UBound($DirList)-1
            ReDim $DirTemp[UBound($DirList)]
            $DirTemp[$i]=RecurseDir($directory & "\" & $DirList[$i])
        Next
    EndIf
    return $DirTemp
EndFunc

Func ListDir($directory)
    dim $DirName=""
    if IsArray($directory) then
        $DirName=$directory[0] & ";"
        for $i=1 to UBound($directory)-1
            if IsArray($directory[$i]) then
                $DirName=$DirName & ListDir($directory[$i])
            EndIf   
        next
        Return $DirName
    EndIf
EndFunc

Func ArrayListDir($DirList)
    dim $DirTemp[1]
    while 1
        if stringlen($DirList) = 0 Then
            ExitLoop
        Else
            ReDim $DirTemp[UBound($DirTemp)+1]
            $DirTemp[0]=UBound($DirTemp)-1
            $DirTemp[UBound($DirTemp)-1]=stringleft($DirList,stringinstr($Dirlist,";",1)-1)
            $DirList=stringright($DirList,stringlen($DirList)-stringinstr($Dirlist,";",1))
        EndIf
    WEnd
    Return $DirTemp
EndFunc

Work smarter not harder.My First Posted Script: DataBase

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  
Followers 0