DirLabel Mill Software Development Dirlabel is a component like TLabel but if you assign a string with a filename and path, DirLabel will try to fit this path in the width of the DirLabel. DirLabel is suitable for Delphi 1, Delphi 2 and Delphi 3. The use of DirLabel Manny programs showing a filename from a table, picture, sound file, etc. If you want to display a filename with it's path in a label you must make the label as wide as the longest path. Normally this is not possible because the path of a filename can be very long, especially in Windows 95, and the space in your program for the label is also limited. DirLabel will try to fit a path in a given width of DirLabel e.g.: c:\program\delphi\testen1\testen2\filenaam.pas can become something like: c:\...\testen1\testen2\filenaam.pas TDirLabel differs form TLabel: TDirLabel does not have the following properties: AutoSize, Caption and WordWrap. Because the width is of course fixed and you want only one text line. The Caption property is replaced for the DirName property, therefore if you assign a new file name and path to DirLabel you assign it to DirName, like: DirLabel1.DirName := 'New file name and path'; Example program In the example program you can manually change the width of the DirLabel and see live what the result will be for a given filename with path. I hope you enjoy yourself with DirLabel, Frank Millenaar Homepage: http://ourworld.compuserve.com/homepages/FMillenaar Email: FMillenaar@compuserve.com Files necessary for the component DirLabel Component: dirlabel.pas dirlabel.dcr Delphi example project: project1.dpr unit1.pas unit1.dfm Extra: DirLabel.wri