选择文件夹,路径选择,

文件夹

资源管理器

推荐  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 选择文件夹,路径选择,浏览文件夹的更多相关文章

  1. 确定文件的位置--浏览文件夹对话框folderBrowserDialog

    private void button1_Click(object sender, EventArgs e) { folderBrowserDialog1.ShowNewFolderButton = ...

  2. C# WINFORM 编程中,选择**文件夹**而不是文件的方法(转)

    我们选择文件可以用 OpenFileDialog ,但是文件夹有两种方法. 法一: 用C#的FolderNameEditor类的子类FolderBrowser类来实现获取浏览文件夹对话框的功能.下面来 ...

  3. MFC 如何创建浏览文件夹的对话框

    如何创建浏览文件夹的对话框 如何创建浏览文件夹的对话框 CString CXXXXDlg::GetOpenfolderPath() { BROWSEINFO bi; ZeroMemory(&b ...

  4. MAC在Finder栏显示所浏览文件夹路径的方法

    我们在使用MAC时,Finder栏默认只显示当前浏览的文件夹名称,而没有显示访问路径,这个问题该怎么解决呢? 操作步骤: 打开“终端”(应用程序->实用工具),输入以下两条命令: default ...

  5. 使用C#选择文件夹、打开文件夹、选择文件

    using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; usin ...

  6. Delphi遍历文件夹及子文件夹(可查找固定格式文件)

    Delphi遍历文件夹及子文件夹 {-------------------------------------------------------------------------------过程名 ...

  7. C# 选择文件、选择文件夹、打开文件(或者文件夹) 路径中获取文件全路径、目录、扩展名、文件名称 追加、拷贝、删除、移动文件、创建目录 修改文件名、文件夹名!!

    https://www.cnblogs.com/zhlziliaoku/p/5241097.html 1.选择文件用OpenDialog OpenFileDialog dialog = new Ope ...

  8. python pandas合并多个excel(xls和xlsx)文件(弹窗选择文件夹和保存文件)

    # python pandas合并多个excel(xls和xlsx)文件(弹窗选择文件夹和保存文件) import tkinter as tk from tkinter import filedial ...

  9. Delphi下遍历文件夹下所有文件的递归算法

    {------------------------------------------------------------------------------- 过程名:    MakeFileLis ...

随机推荐

  1. PHP中echo(),print(),print_r()之间的区别?

    echo是PHP语句, print和print_r是函数,语句没有返回值,函数可以有返回值(即便没有用) print只能打印出简单类型变量的值(如int,string) print_r可以打印出复杂类 ...

  2. 数位DP新识

    简单题:HDU2089    HDU3652  HDU4734   HDU3555  POJ3252  HigoCoder1033(需要前导0,或者用方法4) 总结: 1,dfs(pos,state, ...

  3. appium python实例脚本1

    #coding=utf-8import os, time, unittestfrom appium import webdriver PATH = lambda p:os.path.abspath(o ...

  4. 微软 Windows 系统检测网络连通性(用于显示感叹号)竟然是通过访问一个特殊网址来实现的

    一次我走到了弱网环境中,意外地发现浏览器打开了 http://www.msftconnecttest.com/redirect 网址,随后右下角的网络图标出现了一枚“感叹号”.   吹水的推断 从直观 ...

  5. parcel vue 简单使用

    1.安装依赖 yarn global add parcel-bundler yarn add babel-preset-env --dev yarn add parcel-plugin-vue --d ...

  6. [深度学习]实现一个博弈型的AI,从五子棋开始

    好久没有写过博客了,多久,大概8年???最近重新把写作这事儿捡起来……最近在折腾AI,写个AI相关的给团队的小伙伴们看吧. 搞了这么多年的机器学习,从分类到聚类,从朴素贝叶斯到SVM,从神经网络到深度 ...

  7. python绘图踩的坑

    踩的坑 pyecharts安装地图包 pip install echarts-countries-pypkg 报错Unknown or unsupported command 'install' 这可 ...

  8. linux tcpdump命令抓包

    tcpdump host 210.27.48.1 and \ (210.27.48.2 or 210.27.48.3 \) 截获主机210.27.48.1 和主机210.27.48.2 或210.27 ...

  9. bzoj 3994 [SDOI2015]约数个数和——反演

    题目:https://www.lydsy.com/JudgeOnline/problem.php?id=3994 \( d(i*j)=\sum\limits_{x|i}\sum\limits_{y|j ...

  10. (转)Android 读取联系人(详细)

    import java.io.InputStream; import org.json.JSONArray; import org.json.JSONException; import org.jso ...