Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27193

VS 2012 Question about Combobox

$
0
0
I want to be able to add items to a combobox and then modify the items after.

My code is:

ComboBox2.AddRange(System.IO.Directory.GetDirectories((ComboBox1.SelectedItem.ToString & "test\")))

The combobox1 selected item is the drive selected so usually "C:\" or "E:\" and it reads as "C:\test\", the items that show in combobox2 are the folders inside the "\test" folder which are "1" and "2".

Although the problem is that I don't want the full path displayed and I want to use that folder name to use as a math function.

Such as instead of getting for example "C:\test\1\" or "E:\test\1\ I want "1" by removing the "(ComboBox1.SelectedItem.ToString & "test\")" and then being able to use that "1" and adding 1 to it.

Sorry if i'm being confusing.

Thank you very much in advance.

Viewing all articles
Browse latest Browse all 27193

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>