[Lazarus] Donate function ShortenStringEx to LCL

Werner Pamler werner.pamler at freenet.de
Thu Dec 6 16:27:52 CET 2018


Am 06.12.2018 um 11:40 schrieb AlexeyT via lazarus:
> I want to donate this func. it can truncate text on canvas with 3 
> modes: dots at begin/ at middle of text/ at end of text. Tested in 
> ATTabs demo. Code--
>
> https://github.com/Alexey-T/ATTabs/blob/master/attabs/attabs.pas#L894
>
> char $2026 is ellipsis. Can also use '...' or '..'


Except for more flexible positioning of the '...', this is already 
available as MinimizeName in FileCtrl, or painting text with 
TCanvas.TextRect having its TextStyle.EndEllipsis = true.



More information about the Lazarus mailing list