David O'Brien asks: > Anyone know how to get a string with the '...' replacing long path names? > > I'm sure there is a function to do it but don't know where to look. > > i.e > c:\my documents\the quick brown fox\freds stuff\fred.doc > = > c:\my documents\...\fred.doc
I think you are looking for the DrawTextEx Win32 API call, using the DT_MODIFYSTRING and DT_PATH_ELLIPSIS formatting options. This will do exactly what you want as long as you know the spave into which you want to present the string. Cheers, Max. --------------------------------------------------------------------------- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of "unsubscribe delphi" Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/