我想使用 OpenDialog 选择多个文件并将它们显示在列表框中。如果我的文件路径多于列表框,我希望列表框自动垂直增长以适合所有文件名。
请问这个怎么做?谢谢您的帮助。
foreach (string FileName in oOpenDialog.FileNames)
{
//lstbx_Box1.IntegralHeight = false; //This doesn't auto-grow the list box.
lstbx_Box1.Items.Add(Path.GetFullPath(FileName));
}