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 ...
随机推荐
- 如何让Beamer的logo放在右上角
# 位置需要导入包```\usepackage{beamerfoils}\usepackage{tikz}\usepackage{pgf}\MyLogo{%%\includegraphics[heig ...
- Markdown 效果测试
欢迎使用 Cmd - 在线 Markdown 编辑阅读器 \[ \int e^{-x^2 - y^2} dx = \sqrt{2 \pi} \] 我们理解您需要更便捷更高效的工具记录思想,整理笔记.知 ...
- xcopy 提示文件 还是目录
xcopy /y a.jpg .\pics\b.jpg很多次,但xcopy总是问我“文件名还是目录名”gg了一下,发现答案可以这样通过管道来做echo f | xcopy /y a.jpg .\pic ...
- 深度优先搜索入门:POJ1164城堡问题(递归、用栈模拟递归)
将问题的各状态之间的转移关系描述为一个图,则深度优先搜索遍历整个图的框架为:Dfs(v) {if( v 访问过)return;将v标记为访问过;对和v相邻的每个点u: Dfs(u);}int main ...
- Mac根据端口号查询进程
sudo lsof -i :8080
- DZ X3 和 ECshop 通过uc_server实现会员同步整合教程.
会员数据整合是实现商城和论坛系统共享会员数据.论坛系统注册会员整合后可直接在商城登陆.现以本人社区为例.本人社区采用DZ最新的X3.1 商城采用的ECshop最近的V2.7.3 现在想把两个模板整合在 ...
- RK3288 添加WiFi&BT模块AP6212
CPU:RK3288 系统:Android 5.1 注:系统中自带的模块没有AP6212,相近的只有AP6210,设置为AP6210,直接添加固件也可以正常使用. 此文是手动添加AP6212的例程. ...
- UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 7: ordinal not in range(128) [duplicate]
Python在往文件里写东西的时候,如果ascii码报错 参考 http://stackoverflow.com/questions/19833440/unicodeencodeerror-ascii ...
- Unit01: Spring简介 、 Spring容器 、 Spring IOC
Unit01: Spring简介 . Spring容器 . Spring IOC Spring (1)Spring是什么? Spring是一个开源的用来简化应用开发的框架. (2)Spring的特点? ...
- linux网络编程、系统编程
http://blog.csdn.net/lianghe_work/article/category/2871247