基本上我有一个TcxGrid,它将列出各种文件名,我想根据文件扩展名给出更多细节,特别是它的描述(例如.PDF它的"Adobe Acrobat文档")和它的相关图标.
我注意到有一个非常类似的问题,但它与C#有关,我想要一些基于Delphi的东西.
关于在哪里查找这种信息的建议是好的,如果有一个类似于上面的C#帖子中提到的类(显然在Delphi中),这将是很好的.
这个问题与Delphi应用程序中自动使用某些Windows资源管理器功能的问题有关.
有没有办法在Delphi中自动使用metrix前缀格式化整数?不知何故自动获得像Windows资源管理器给出的结果?我的意思是自动将1024转换为1.0 K.
让我们说类似的话
FormatMetric('FileSize = %d', [26112], 1,'B')
// where the third parameter is the number of decimal digits
// and the fourth is the string that is appended
Run Code Online (Sandbox Code Playgroud)
将返回
25.5 KB
Run Code Online (Sandbox Code Playgroud)
当然我可以编写这个代码,但RTL中有这样的东西吗?