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 ...
随机推荐
- (转)spring AOP探索
原文地址:http://www.cnblogs.com/zuoxiaolong/p/spring6.html 自己整理后,供自己学习方便: 目前由AOP联盟给出了AOP的标准,AOP联盟的规范只是提供 ...
- Backward Digit Sums
FJ and his cows enjoy playing a mental game. They write down the numbers from 1 to N (1 <= N < ...
- FirstTry_HelloWorld
#include <qapplication.h> #include <qpushbutton.h> int main( int argc, char **argv ) { Q ...
- riotjs 简单使用&&browserify 构建
项目地址: http://riotjs.com/ 备注: 为了简单使用了 browserify 进行构建 1. 项目结构 ├── app.css ├── gulpfile.js ├── index.h ...
- Spring Boot 入门之持久层篇(三)
原文地址:Spring Boot 入门之持久层篇(三) 博客地址:http://www.extlight.com 一.前言 上一篇<Spring Boot 入门之 Web 篇(二)>介绍了 ...
- 简单服务端缓存API设计
Want 我们希望设计一套缓存API,适应不同的缓存产品,并且基于Spring框架完美集成应用开发. 本文旨在针对缓存产品定义一个轻量级的客户端访问框架,目标支持多种缓存产品,面向接口编程,目前支持简 ...
- maven中项目发布jar包不同步
昨天的项目今天运行的时候突然发现今天就不能运行了 严重: Error configuring application listener of class org.springframework.web ...
- GOF23设计模式之解释器模式(interpreter)
一.解释器模式概述 (1)它是一种不常用的设计模式: (2)由于描述如何构成一个简单的语言解释器,主要用于使用面向对象语言开发的编译器和解释器的设计: (3)当我们需要开发一种新的语言时,可以考虑使用 ...
- python 网络编程--socket模块/struct模块
socket模块: 客户端:CS架构, client -> server 浏览器:BS架构, browser -> server 网络通信本质:传输字节 doc命令查看ip地址:ipc ...
- [python] 使用scikit-learn工具计算文本TF-IDF值
在文本聚类.文本分类或者比较两个文档相似程度过程中,可能会涉及到TF-IDF值的计算.这里主要讲述基于Python的机器学习模块和开源工具:scikit-learn. 希望文章对你有所帮 ...