RobotStudio event

Populate and select file from listview

Hi I'm using RAB and Robatware 5.12 on VS 2008
 

I want the user to look through a listview of available files and folders for a module and then to load that chosen module into the controller for use with my program.

 

I've added the following to the VB code

Friend
WithEvents aFileSystem As FileSystemDomain.FileSystem

...
Me.aFileSystem = Me.aController.FileSystem

I'm trying to replicate the explorer window as i have constructed a listview with 2 columns with 'name' and 'type' but I'm not sure how to populate the listview with the files and show the folder or file icon next to them.  I also need to navigate the directory tree.  I'm pretty sure the GTPUFileDialog will be used as well but just not sure how?
Any examples would be greatly appreciated...
 
Regards,
bigM
 

Comments

  • You can try GetFilesAndDirectories(searchpattern) which will give return a list of all files and folders that meet the search pattern, but it would be far simpler just to use the GTPUOpenFileDialog with filters for *.mod or *.sys. This is well-documented in the RAB User's Guide.
    Russell Drown
  • Hi Russ,
     

    I've dragged the GTPUOpenFileDialog to my TabControl but I've add the textbox, listview etc manually.  The RAB example looks like it generates the whole view.

    I'm totally lost here. I see it in the components pane but there are so little properties for it.

     

    Any steps to get me in the right direction?
  • Got it!,
     

    Its just like a message box, just display it with    .showme()