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