[Lazarus] Changing the translation of forms while the program is running

Graeme Geldenhuys graemeg.lists at gmail.com
Mon Jul 16 14:35:47 CEST 2012

On 16 July 2012 13:18, Mattias Gaertner <nc-gaertnma at netcologne.de> wrote:
> Yes. This catches all special cases like memos, tree nodes, list views
> and private variables as well.

Correct, and I also couldn't rely on something like RTTI to iterate or
query widgets on a form, because my widgets are declared private only
(not published).

And yet another alternative, one could use Interfaces too. The Form
implements a "translation interface", and the broadcast mechanism
could simply query each loaded form for the specific interface, and if
found, call the UpdateCaptions method of that interface. This way you
don't need form inheritance, but the end result is similar in each

As always in programming, there are a 101 ways to accomplish the same task. :)

  - Graeme -

fpGUI - a cross-platform Free Pascal GUI toolkit

More information about the Lazarus mailing list