mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-23 07:59:44 +02:00
added SelectDirectory dialog
git-svn-id: trunk@4444 -
This commit is contained in:
parent
70e9f64a59
commit
9338a6c4f2
@ -38,7 +38,7 @@ uses
|
||||
Buttons, Extctrls, Registry, Calendar, Clipbrd, Forms, LCLLinux, Spin,
|
||||
Comctrls, Graphics, StdCtrls, Arrow, Controls, ImgList, Menus, Toolwin,
|
||||
Dialogs, Messages, Clistbox, ActnList, Grids, MaskEdit,
|
||||
Printers, PostScriptPrinter, CheckLst, PairSplitter;
|
||||
Printers, PostScriptPrinter, CheckLst, PairSplitter, DirSel;
|
||||
|
||||
implementation
|
||||
|
||||
@ -47,6 +47,9 @@ end.
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.26 2003/08/01 09:44:52 mattias
|
||||
added SelectDirectory dialog
|
||||
|
||||
Revision 1.25 2003/07/31 17:16:32 mattias
|
||||
added ToDo for textstrings.pas
|
||||
|
||||
|
@ -37,8 +37,9 @@ unit Dialogs;
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, LCLlinux, FileCtrl, LCLStrConsts, LCLType, VCLGlobals,
|
||||
LMessages, Forms, Controls, GraphType, Graphics, Buttons, StdCtrls;
|
||||
Classes, SysUtils, LCLlinux, InterfaceBase, FileCtrl, LCLStrConsts, LCLType,
|
||||
VCLGlobals, LMessages, Forms, Controls, GraphType, Graphics, Buttons,
|
||||
StdCtrls;
|
||||
|
||||
|
||||
type
|
||||
@ -295,14 +296,22 @@ type
|
||||
Function InputBox(const ACaption, APrompt, ADefault : String) : String;
|
||||
Function PasswordBox(const ACaption, APrompt : String) : String;
|
||||
|
||||
{Directory Selection}
|
||||
type
|
||||
TSelectDirectoryProc = function(const Caption: String; const Root: string;
|
||||
var Directory: string; ShowHidden: Boolean): Boolean;
|
||||
|
||||
function SelectDirectory(const Caption: String; const Root: string;
|
||||
var Directory: string; ShowHidden: Boolean): Boolean;
|
||||
|
||||
var
|
||||
SelectDirectoryProc: TSelectDirectoryProc;
|
||||
|
||||
|
||||
procedure Register;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
InterfaceBase;
|
||||
|
||||
const
|
||||
//
|
||||
//TODO: all the constants below should be replaced in the future
|
||||
@ -364,6 +373,14 @@ begin
|
||||
Result := MessageDlg(Caption,Text,DlgType,Buttons,0);
|
||||
end;
|
||||
|
||||
function SelectDirectory(const Caption: String; const Root: string;
|
||||
var Directory: string; ShowHidden: Boolean): Boolean;
|
||||
begin
|
||||
Result:=false;
|
||||
if Assigned(SelectDirectoryProc) then
|
||||
Result:=SelectDirectoryProc(Caption,Root,Directory,ShowHidden);
|
||||
end;
|
||||
|
||||
|
||||
{$I colordialog.inc}
|
||||
{$I commondialog.inc}
|
||||
@ -378,6 +395,7 @@ initialization
|
||||
Forms.MessageBoxFunction:=@ShowMessageBox;
|
||||
InterfaceBase.InputDialogFunction:=@ShowInputDialog;
|
||||
InterfaceBase.PromptDialogFunction:=@ShowPromptDialog;
|
||||
SelectDirectoryProc:=nil;
|
||||
|
||||
finalization
|
||||
|
||||
@ -386,6 +404,9 @@ end.
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.33 2003/08/01 09:44:52 mattias
|
||||
added SelectDirectory dialog
|
||||
|
||||
Revision 1.32 2003/06/13 21:32:17 mattias
|
||||
moved TColorButton to misc palette
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user