Lazarus

Miscellaneous => Translations => Topic started by: jcmontherock on June 30, 2021, 04:24:19 pm

Title: TreeView Nodes text translation
Post by: jcmontherock on June 30, 2021, 04:24:19 pm
Hello,

I have a Treeview control in my application. When I try to change language and translate nodes text, there are not translated. Do we have to rebuild all TreeView to have text translated ? With others controls we do not have this problem. All node text to be translated are in po file. See example.
Title: Re: TreeView Nodes text translation
Post by: Alextp on June 30, 2021, 06:55:31 pm
I guess this is not supported and must not be supported: like e.g. for TMemo and TListbox lines.
Title: Re: TreeView Nodes text translation
Post by: jcmontherock on July 01, 2021, 06:22:55 pm
I finally find how to do: at TV creation I save the node index and the address of the resource string in a record and restore it at language change. You can even save the the pointer in the TV Node.Data.
Hoping it will be helpful for somebody.
TinyPortal © 2005-2018