Jump to content

Adding filenames into a listview


Recommended Posts

#include <GUIConstants.au3>
; == GUI generated with Koda ==
$Form1 = GUICreate("AForm1", 622, 441, 192, 125)
$List1 = GUICtrlCreateList("", 16, 16, 193, 396, -1, $WS_EX_CLIENTEDGE)
$Button1 = GUICtrlCreateButton("Add", 264, 40, 137, 25)
GUISetState(@SW_SHOW)
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case $msg = $Button1
        GUICtrlSetData($List1,FileGetShortName(FileOpenDialog("Select a file to open",@ScriptDir, "All Files (*.*)")))
    EndSelect
WEnd
Exit

Is there a way to only display the file name, and not the whole file in the list? I used FileGetShortName, but it's still too long. Thanks,

Codemyster

Link to comment
Share on other sites

Is there a way to only display the file name, and not the whole file in the list? I used FileGetShortName, but it's still too long. Thanks,

use _PathSplit().

Cheers

Kurt

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...