Unit FileLbl

-------------------------------------------------------------------------------------} { A "FileLabel" component for Delphi32. } { Copyright 1997, Patrick Brisacier. All Rights Reserved. } { This component can be freely used and distributed in commercial and private } { environments, provided this notice is not modified in any way. } { -------------------------------------------------------------------------------------} { Feel free to contact us if you have any questions, comments or suggestions at } { PBrisacier@mail.dotcom.fr (Patrick Brisacier) } { You can always find the latest version of this component at: } { http://www.worldnet.net/~cycocrew/delphi/ } { -------------------------------------------------------------------------------------} { Date last modified: 03/01/97 } { -------------------------------------------------------------------------------------} { -------------------------------------------------------------------------------------} { TFileLabel v1.01 } { -------------------------------------------------------------------------------------} { Description: } { Display a filename with path and drive letter on a label without } { without cutting the filename. If the width of the label is too } { small TFileLabel hide some directories and replace them by '...'. } { Example : } { TFileLabel display 'C:\WINDOWS\SYSTEM\FOO.DLL' with one of } { the following string depend on the width. } { 'C:\WINDOWS\SYSTEM\FOO.DLL' } { 'C:\...\SYSTEM\FOO.DLL' } { 'C:\...\FOO.DLL' } { '...\FOO.DLL' } { 'FOO.DLL' } { Properties: } { TFileLabel is based on TCustomLabel. It has all the TLabel properties } { except Caption and add three properties : FileName, Separator and Direction. } { * FileName: String; } { The filename you want to display. } { * Separator: String; } { The separator is the string used to find the directories : '\' by } { default. But you can change the separator to '/' for an unixlike } { or an URL filename. } { * Direction: TDirection; } { Direction has two possible different values which are : } { + drFromLeft : suppress directories from the LEFT. } { Example : 'C:\WINDOWS\SYSTEM\FOO.BAR' } { 'C:\...\SYSTEM\FOO.BAR' } { 'C:\...\FOO.BAR' } { '...\FOO.BAR' } { 'FOO.BAR' } { + drFromRight : suppress directories from the RIGHT. } { Example : 'C:\WINDOWS\SYSTEM\FOO.BAR' } { 'C:\WINDOWS\...\FOO.BAR' } { 'C:\...\FOO.BAR' } { '...\FOO.BAR' } { 'FOO.BAR' } { The default value for Direction is drFromLeft. } { } { See example contained in example.zip file for more details. } { -------------------------------------------------------------------------------------} { Revision History: } { 1.00: + Initial release } { 1.01: + Modified by Patrick Brisacier } { + Fix the problem with font : when we change font now the caption } { is recalculated } { -------------------------------------------------------------------------------------

Classes

TFileLabel -

Functions

Register -
sBreakApart - This code came from Lloyd's help file! (begin) } { Thanks to Lloyd !!! This help file is VERY useful.

Types

TDirection

Constants

Variables


Functions


procedure Register;


function sBreakApart(BaseString, BreakString: string; StringList: TStringList): TStringList;

This code came from Lloyd's help file! (begin) } { Thanks to Lloyd !!! This help file is VERY useful.

Types


TDirection = (drFromLeft, drFromRight);

Constants


Variables