Vcl.FileCtrl.MinimizeName

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function MinimizeName(const Filename: TFileName; Canvas: TCanvas;
MaxLen: Integer): TFileName;

C++

extern DELPHI_PACKAGE System::Sysutils::TFileName __fastcall MinimizeName(const System::Sysutils::TFileName Filename, Vcl::Graphics::TCanvas* Canvas, int MaxLen);

Properties

Type Visibility Source Unit Parent
function public
Vcl.FileCtrl.pas
Vcl.FileCtrl.hpp
Vcl.FileCtrl Vcl.FileCtrl

Description

Shortens a fully qualified path name so that it can be drawn with a specified length limit.

Use MinimizeName to obtain a version of a file name and path that can be drawn on a limited size drawing surface. MinimizeName replaces directories in the path portion of the file name with dots until the resulting name fits the specified number of pixels in length.

MinimizeName returns the shortened name.

Filename is the fully qualified path name that (possibly) needs to be shortened.

Canvas is the drawing surface on which the resulting name is to be rendered. It is used to determine font metrics.

MaxLen is the length, in pixels, available for drawing the file name on the canvas.

See Also