CEF4Delphi/demos/Delphi_VCL/MiniBrowser/uDirectorySelector.pas
Salvador Díaz Fau f764c39cc1 Replace the SetPEFlags code
Remove the outdated license text.
Use the main cef.inc file in all Delphi demos.
Fixed issue #493.
2023-11-26 19:28:28 +01:00

48 lines
1.1 KiB
ObjectPascal

unit uDirectorySelector;
{$I ..\..\..\source\cef.inc}
interface
uses
{$IFDEF DELPHI16_UP}
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.FileCtrl, Vcl.ExtCtrls;
{$ELSE}
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls,
FileCtrl, ExtCtrls;
{$ENDIF}
type
TDirectorySelectorFrm = class(TForm)
Panel1: TPanel;
OkBtn: TButton;
CancelBtn: TButton;
Panel2: TPanel;
DriveComboBox1: TDriveComboBox;
Panel3: TPanel;
DirectoryListBox1: TDirectoryListBox;
private
procedure SetSelectedDir(const aValue : string);
function GetSelectedDir : string;
public
property SelectedDir : string read GetSelectedDir write SetSelectedDir;
end;
implementation
{$R *.dfm}
procedure TDirectorySelectorFrm.SetSelectedDir(const aValue : string);
begin
DirectoryListBox1.Directory := aValue;
end;
function TDirectorySelectorFrm.GetSelectedDir : string;
begin
Result := DirectoryListBox1.Directory;
end;
end.