Windows with Delphi Windows API (94) Windows Filesystem (41) Windows Forms (69) Windows Graphics (38)
Exchange Links About this site Links to us 
|
Display a long path as 'c:...pathmyfile.txt'
This article has not been rated yet. After reading, feel free to leave comments and rate it.
To display a (potential) long path shortened in the format shown above,
you may use the function MinimizeName from Delphi's unit FileCtrl.
In case you were using a TLabel, you can register the component
TPathLabel (declared in the same unit); TPathLabel uses MinimizeName
to display the caption.
 | |  | |
unit FileCtrl;
function MinimizeName(const Filename: TFileName; Canvas: TCanvas;
MaxLen: Integer): TFileName;
type
TPathLabel = class(TCustomLabel);
| |  | |  |
Comments:
|