Replace directories from the start of the string, not the end also.

JED

[EMAIL PROTECTED] wrote on 22/01/2003 09:58:52 AM:

> Okay,
>
> Well, I think I'm probably allowed to say that if you want to roll your
own,
> here are some tips completely off the top of my head:
> Use the TextWidth function of the Canvas on which you're wanting to place
> your label to check the length of the filename.
> Keep reducing the length of the filename by replacing directories with
...
> until it suits.
>
> No API calls required. ;-)
>
> Cheers,
>
> C.
>
> -----Original Message-----
> From: Nahum Wild [mailto:[EMAIL PROTECTED]]
>
> We are currently still using Delphi 4 and don't seem to have it. :o(
>
> Nahum.
>
> > [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
> > wrote on
> >
> > MinimiseName in FileCtrl unit...
> >
> > Why it's not in the D5 help, I dunno...
> >
> > HTH,
> >
> > C.
> >
> > -----Original Message-----
> > From: Nahum Wild [mailto:[EMAIL PROTECTED]]
> >
> > Does anybody know of a good way of shortening a capition shown on
> > screen to X pixels and putting an '...' at the end?  I seem to recall
> > that there might be an API call that'll do it, but I can't remember
> > it's name.
>
---------------------------------------------------------------------------
>     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/



This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the [EMAIL PROTECTED]

---------------------------------------------------------------------------
    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/

Reply via email to