doublecmd/src/fhotdirimportexport.pas
Alexander Koblov 50efdc5ab8 ADD: Calculate/verify CRC32 in split/combine function (patch by Denis Bisson)
UPD: Increase directory hot list functionality (patch by Denis Bisson)
2014-07-27 10:25:50 +00:00

64 lines
1.6 KiB
ObjectPascal

unit fhotdirimportexport;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
Buttons;
type
{ Tfrmhotdirimportexport }
Tfrmhotdirimportexport = class(TForm)
btnSelectAll: TBitBtn;
btnSelectionDone: TBitBtn;
btnCancelImportation: TBitBtn;
lblHintHoldControl: TLabel;
lbHint: TLabel;
lsImportedHotDir: TListBox;
procedure FormCreate(Sender: TObject);
procedure FormResize(Sender: TObject);
private
{ private declarations }
RememberItemHeight:longint;
public
{ public declarations }
end;
var
frmhotdirimportexport: Tfrmhotdirimportexport;
implementation
{$R *.lfm}
uses
uGlobs;
{ Tfrmhotdirimportexport }
procedure Tfrmhotdirimportexport.FormCreate(Sender: TObject);
begin
// Initialize property storage
InitPropStorage(Self);
lsImportedHotDir.Items.Add('W'); //All this to be able to know the itemheight.
RememberItemHeight:=lsImportedHotDir.ItemHeight; //It looks like in OwnerDrawFixed, the ItemHeight is reported as 0
lsImportedHotDir.Clear; //So prior to make it in lbOwnerDrawFixed, we remember the normal itemheight
lsImportedHotDir.Style:=lbOwnerDrawFixed; //And for this, we needed to fill at leat one item...
end;
procedure Tfrmhotdirimportexport.FormResize(Sender: TObject);
var
NumberOfColumn:integer;
begin
NumberOfColumn:=lsImportedHotDir.Width div 300;
if NumberOfColumn<1 then NumberOfColumn:=1;
lsImportedHotDir.Columns:=NumberOfColumn;
end;
end.