directory - delphi DirectoryListBox 获取选中的目录名
解决方案
dirListBox.Directory 返回父目录,而不是子目录。
我可以获得正确名称的唯一方法是使用 itemindex。当您单击或将光标移动到目录时,itemindex 会更新。
fMain.eProject.Text:=fProject.dirlistBox.Items[fProject.dirListBox.ItemIndex];
fMain.ePath.Text:=fProject.dirListBox.GetItemPath(fProject.dirListBox.ItemIndex);
推荐阅读
- python - 按 0 级索引的最后一个值对 Pandas MultiIndex 进行排序
- pine-script - 由于某些未知原因,未绘制某些阻力
- node.js - Botframework 如何首先进行身份验证,然后使用令牌进行图形 API 调用
- javascript - 我正在尝试将 base64 编码的字符串转换为我的反应文件上的图像
- esp8266 - ESP8266 和 ATmega8 UART
- c# - 停止 C# 在编译错误时暂停调试
- python - python scrapy没有提取li文本
- python - Python - 添加具有属性的新子元素
- java - 如何在 Android Studio 中使用正则表达式从给定的 url 中提取子字符串
- gcc - 使用多版本控制时的编译时 AVX 检测