Download Now

    Reference TExplorerPreview

    Declared in Codebot.Windows.Explorer.pas on line 678

    TExplorerPreview shows a file using the preview handlers of Windows, the same previews shown in the preview pane of Windows Explorer. Items without a preview handler, such as images and folders, show their thumbnail or icon and details drawn in the font Windows Explorer uses for items. The details are the name, type, size, and date modified, along with the description and version of programs, the width and height of images, the duration and artist of audio, the codec, frame size, and duration of video, the owner of folders and the access the current user has to them, and the total size and free space of drives. Thumbnails are at most 256 by 256 pixels. When it is bound to a TExplorerBinding it shows the item selected in a bound explorer view
      TExplorerPreview = class(TCustomControl, IComponentBindingClient)
      protected
        procedure CreateWnd; override;
        procedure DestroyWnd; override;
        procedure Paint; override;
        procedure Resize; override;
      public
        { Create a new explorer preview }
        constructor Create(AOwner: TComponent); override;
        destructor Destroy; override;
        { Remove the preview }
        procedure Clear;
        { Load the preview again }
        procedure Refresh; reintroduce;
        { The preview handler of the file shown, or nil if there is none }
        property Handler: IPreviewHandler read FHandler;
        { A preview is shown }
        property Previewing: Boolean read GetPreviewing;
      published
        { Text shown when there is no file or it cannot be found }
        property EmptyText: string read FEmptyText write SetEmptyText;
        { The file shown. Previews are loaded shortly after it changes, so moving
          quickly through files does not load each of them }
        property FileName: string read FFileName write SetFileName;
        { Invoked before a preview is loaded. Set Allow to false to show no preview }
        property OnPreview: TExplorerPathEvent read FOnPreview write FOnPreview;
        { Invoked when a file has no preview handler or its preview could not be
          shown. The thumbnail and details of the file are shown instead }
        property OnPreviewFailed: TExplorerFolderEvent read FOnPreviewFailed write FOnPreviewFailed;
        property Align;
        property Anchors;
        property BorderSpacing;
        property BorderStyle default bsNone;
        property Color default clWindow;
        property Constraints;
        property DragCursor;
        property Enabled;
        property Font;
        property Hint;
        property ParentColor default False;
        property ParentFont;
        property ParentShowHint;
        property PopupMenu;
        property ShowHint;
        property TabOrder;
        property TabStop;
        property Visible;
        property OnChangeBounds;
        property OnClick;
        property OnContextPopup;
        property OnDblClick;
        property OnDragDrop;
        property OnDragOver;
        property OnEnter;
        property OnExit;
        property OnMouseDown;
        property OnMouseMove;
        property OnMouseUp;
        property OnResize;
        property OnShowHint;
      end;

    See also

    IComponentBindingClient in Codebot.Binding.pas