Call the WinAPI function DrawText (or it might have been DrawTextEx), and
one of the options is to shorten the string with an ellipsis.  You can also
get DrawText to return the shortened string, rather than draw it on the
canvas.

Dennis.

----- Original Message -----
From: "Nahum Wild" <[EMAIL PROTECTED]>
To: "Multiple recipients of list delphi" <[EMAIL PROTECTED]>
Sent: Wednesday, January 22, 2003 11:49 AM
Subject: RE: [DUG]: Ellipsis truncation


> 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]]
> > Sent: Wednesday, 22 January 2003 11:32 a.m.
> > To: Multiple recipients of list delphi
> > Subject: [DUG]: Ellipsis truncation
> >
> >
> > 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.
> >
> >
> > Cheers,
> > Nahum.
> >
> > --------------------------------------------------------------
> > -------------
> >     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/
> > --------------------------------------------------------------
> > -------------
> >     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/
>
>
> --------------------------------------------------------------------------
-
>     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/
>
---------------------------------------------------------------------------
    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