TPDFlibViewerFileOpen

Kiểu dữ liệu, tương tác trình xem, hành động

Mô tả

Action mở tài liệu qua hộp thoại mở tệpHàm dựng đặt sẵn

Caption thành Open... và Hint thành Open a PDF document; khi chạy, action hiển thị TOpenDialog lọc tệp PDF với ofFileMustExist, ghi lại tên đã chọn vào LastFileName rồi nạp bằng LoadFromFile với mật khẩu rỗngKhác với các action khác của bộ xem, nó vẫn bật khi chưa có tài liệu mở, vì mở tài liệu chính là mục đích của nó

Khác các hành động viewer khác, nó vẫn bật khi chưa mở tài liệu vì mở tài liệu là mục đích của nó

Khai báo

TPDFlibViewerFileOpen = class(TPDFlibViewerAction) private FLastFileName: WideString; protected function DoUpdate: Boolean; override; procedure DoExecute; override; public constructor Create(AOwner: TComponent); override; property LastFileName: WideString read FLastFileName; end;

Tham số

LastFileNameTên tệp do hộp thoại mở gần nhất chọn, cũng là tệp mà bộ xem đã nạp

Xem thêm

TPDFlibViewerAction, LoadFromFile, TPDFlibViewerFileSaveAs, TPDFlibViewer