delphi 选择文件夹,路径选择,浏览文件夹
选择文件夹,路径选择,
文件夹
资源管理器
推荐 SelectDirectory
http://docwiki.embarcadero.com/Libraries/Seattle/en/Vcl.FileCtrl.TSelectDirFileDlgOpts
Vcl.FileCtrl.hpp
if (!SelectDirectory("请选择目录","",DaoPath))
{
return;
}
SelectDirectory
#include "FileCtrl.hpp" const SELDIRHELP = ;
void __fastcall TForm1::Button1Click(TObject *Sender)
{
String Dir = "C:\\Program Files\\CodeGear";
if (SelectDirectory(Dir, TSelectDirOpts() << sdAllowCreate << sdPerformCreate << sdPrompt,SELDIRHELP))
Label1->Caption = Dir;
}
SHBrowseForFolder
http://bbs.csdn.net/topics/390017304
Vcl.Shell.ShellCtrls
TShellComboBox
TShellTreeView
TShellListView
文件名:
ShellListView1.Folders[ShellListView1.ItemIndex].PathName
ShellTreeView.SelectedFolder.PathName;
//2018.1.18
http://docwiki.embarcadero.com/Libraries/Tokyo/en/Vcl.FileCtrl.TSelectDirFileDlgOpts
能粘贴路径,选择路径,快速输入
procedure TForm.Button4Click(Sender: TObject);
var
astrPath: tarray<string>; // 用户选定后的目录
begin
//TSelectDirFileDlgOpt.sdHidePinnedPlaces
if (SelectDirectory('请选择文件保存的路径', astrPath, [sdNoDereferenceLinks])) then
begin
self.Caption := astrPath[];
end; end;
procedure TForm.Button1Click(Sender: TObject);
const
SELDIRHELP = ;
var
Dir: string;
begin
Dir := 'C:\Windows';
if Vcl.FileCtrl.SelectDirectory(Dir, [sdAllowCreate, sdPerformCreate, sdPrompt], SELDIRHELP) then
self.Caption := Dir;
end;
参考写的很细,学习
https://www.cnblogs.com/huangygdelphi/articles/1969357.html
delphi 选择文件夹,路径选择,浏览文件夹的更多相关文章
- 确定文件的位置--浏览文件夹对话框folderBrowserDialog
private void button1_Click(object sender, EventArgs e) { folderBrowserDialog1.ShowNewFolderButton = ...
- C# WINFORM 编程中,选择**文件夹**而不是文件的方法(转)
我们选择文件可以用 OpenFileDialog ,但是文件夹有两种方法. 法一: 用C#的FolderNameEditor类的子类FolderBrowser类来实现获取浏览文件夹对话框的功能.下面来 ...
- MFC 如何创建浏览文件夹的对话框
如何创建浏览文件夹的对话框 如何创建浏览文件夹的对话框 CString CXXXXDlg::GetOpenfolderPath() { BROWSEINFO bi; ZeroMemory(&b ...
- MAC在Finder栏显示所浏览文件夹路径的方法
我们在使用MAC时,Finder栏默认只显示当前浏览的文件夹名称,而没有显示访问路径,这个问题该怎么解决呢? 操作步骤: 打开“终端”(应用程序->实用工具),输入以下两条命令: default ...
- 使用C#选择文件夹、打开文件夹、选择文件
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; usin ...
- Delphi遍历文件夹及子文件夹(可查找固定格式文件)
Delphi遍历文件夹及子文件夹 {-------------------------------------------------------------------------------过程名 ...
- C# 选择文件、选择文件夹、打开文件(或者文件夹) 路径中获取文件全路径、目录、扩展名、文件名称 追加、拷贝、删除、移动文件、创建目录 修改文件名、文件夹名!!
https://www.cnblogs.com/zhlziliaoku/p/5241097.html 1.选择文件用OpenDialog OpenFileDialog dialog = new Ope ...
- python pandas合并多个excel(xls和xlsx)文件(弹窗选择文件夹和保存文件)
# python pandas合并多个excel(xls和xlsx)文件(弹窗选择文件夹和保存文件) import tkinter as tk from tkinter import filedial ...
- Delphi下遍历文件夹下所有文件的递归算法
{------------------------------------------------------------------------------- 过程名: MakeFileLis ...
随机推荐
- Mongodb中在已有Colloection插入/更新相关域值
[{ "confident" : "no", "score" : 0.327355, "label" : "/ ...
- 《DSP using MATLAB》示例Example7.6 Type-3 Linear-Phase FIR
代码: h = [-4, 1, -1, -2, 5, 0, -5, 2, 1, -1, 4]; M = length(h); n = 0:M-1; [Hr, w, c, L] = Hr_Type3(h ...
- UVA11401 Triangle Counting
题意 输入\(n\),输出有多少种方法可以从\(1,2,3,\dots,n\)中选出3个不同的整数,使得以他们为三边长可以组成三角形. \(n \leq 10^6\) 分析 参照刘汝佳的题解. 按最大 ...
- traits编程---萃取容器中迭代器的类型等
可以直接利用STL中定义好的traits_iterator来萃取 /*特性萃取器*/ template <class unknown_class> struct unknown_class ...
- Cluster的日记体系
Cluster的日志体系 Cluster的日志体系: Oracle cluster不像数据库那样,具有丰富的视图.工具可以用来辅助诊断,他的日志和trace文件时唯一的选择.但不想oracle只有al ...
- centos7下安装oracle11gR2
Centos7安装oracle11gR2说明 Centos7安装oracle11gR2说明 环境准备 安装Oracle前准备 创建运行oracle数据库的系统用户和用户组 创建oracle数据库安装目 ...
- 初识php,开发环境的配置
PHP开发环境配置和第一个PHP程序(phpStudy+PhpStorm) 第一步 下载phpStudy 首先,到phpStudy官网上下载最新的phpStudy版本. 第二步 安装phpStudy ...
- NanoPiM1开箱测试
等了快一周了,终于那M1与那外壳一起给我寄过来了. 上午收到,开箱图就不亮了,来一上好电的图! 一同购买来的MSD卡里什么也没有,上电测试时只看到绿色的灯微微亮(这是一个BUG吗!!!!哈哈). 所以 ...
- PPP PDP 及GPRS
1.相关概念: PDP:Packet Data Protocol 分组数据协议 PLMN:Public Land Mobile Network,公共陆地移动网络 APN:Access Point Na ...
- Management
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.T ...