Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2018-12

Donate function ShortenStringEx to LCL

5 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Werner Pamler
to AlexeyT: I want to donate this func. it can truncate text on canvas with 3 modes: dots at begin/…
AlexeyT wrote 7 lines
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.

Reply by email