블로그 이미지
Every unexpected event is a path to learning for you.

카테고리

분류 전체보기 (2737)
Unity3D (817)
Programming (474)
Server (33)
Unreal (4)
Gamebryo (56)
Tip & Tech (228)
협업 (58)
3DS Max (3)
Game (12)
Utility (136)
Etc (96)
Link (32)
Portfolio (19)
Subject (90)
iOS,OSX (53)
Android (14)
Linux (5)
잉여 프로젝트 (2)
게임이야기 (3)
Memories (20)
Interest (38)
Thinking (38)
한글 (30)
PaperCraft (5)
Animation (408)
Wallpaper (2)
재테크 (18)
Exercise (3)
나만의 맛집 (3)
냥이 (10)
육아 (16)
Total
Today
Yesterday
04-20 00:00

IT, C#, FolderBrowserDialog, C# FolderBrowserDialog, C# 디렉토리, C# OpenFileDialog, OpenFileDialog




How to C# selecting a Directory in an open file dialog
http://ssscripting.wordpress.com/2009/06/07/c-selecting-a-directory-in-an-open-file-dialog/

FolderBrowserDialog dialog = new FolderBrowserDialog();
dialog.SelectedPath  = @"C:\";    // 열 때 폴더를 지정하려면 이런식으로..(추가)

dialog.ShowDialog();
string selected = dialog.SelectedPath;

이렇게 코딩하면 폴더 찾아보기를 구현할 수 있고 선택한 정보는 dialog.SelectedPath 로 넘어오게 되어 폴더 경로 정보를 처리할 수 있습니다.


출처 : http://ndolson.com/1370



[추가] 

폴더 다이얼로그 열릴 때, 시작되는 폴더 위치를 알고싶어서 찾다가

ShowDialog 하기 전에 SelectedPath를 셋팅해주면 된다는 걸 알고 글에 추가해놓음..

근데..

화면 이상 내려가면 스크롤을 내려야 보이는데..

포커스 있는 지점으로 스크롤 이동은 안될려나..

좀 더 알아봐야 될 듯..

반응형
Posted by blueasa
, |