当我在组合框 1 中更改我的选择时,我无法更新组合框 2 中的内容,我错过了什么或做错了什么?
Imports System.IO
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'get sub directory\ toolpalette group names...
ComboBox1.DataSource = New DirectoryInfo("C:\VTS\TREADSTONE LT\ATC").GetDirectories()
Dim filelocation As String
filelocation = ("C:\VTS\TREADSTONE LT\ATC\" & ComboBox1.Text & "\")
'gets file\ paltte names...
For Each BackupFiles As String In My.Computer.FileSystem.GetFiles(filelocation, FileIO.SearchOption.SearchTopLevelOnly, "*.*")
ComboBox2.Items.Add(IO.Path.GetFileNameWithoutExtension(BackupFiles))
Next
'reloads the combobox contents...
ComboBox1.Refresh()
End Sub
End Class