c# listbox view directory's and sub directory's and select folder and save path.

  • Thread starter Thread starter elfenliedtopfan2
  • Start date Start date
E

elfenliedtopfan2

Guest
ok so i been trying to get my checked listbox to work i want it to load with all folders and sub folders and want user to check the folder they want to save and once checked will save i have made this code

AnimPaths.Items.Clear();
string bo3animpath = Environment.GetEnvironmentVariable("TA_TOOLS_PATH") + "\\xanim_export\\";
string[] dirs = Directory.GetDirectories(bo3animpath, "*", SearchOption.AllDirectories);

foreach(string dir in dirs)
{
AnimPaths.Items.Add(new DirectoryInfo(dir).Name);
elfstring = AnimPaths.CheckedItems.ToString();
}


witch will list all directory's in kinda a strange was i thought you would have to click the folder and it would open tree click a folder it shows other folders in that folder but lists them all in the in the listbox not a problem though


issue i looking for is i want to select the checked item and it save the path of the item ( but dont want it to show the path of the folder in the listbox i have that fine image below shows

lh2KmkA.png

so with galil_bin shown checked i want it to select the path of that folder and save it


also minor little issue i have is galil_bin and other folders there they are inside elfenliedtopfan5_anims

is there a way to get it so you can select the root folder and it shows all that is in the folder selected because its a mystery to why its not done that by default


thanks in advance elfenliedtopfan5

Continue reading...
 
Back
Top