Recent

Author Topic: TreeView Nodes text translation  (Read 3346 times)

jcmontherock

  • Jr. Member
  • **
  • Posts: 78
TreeView Nodes text translation
« 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.

Alextp

  • Hero Member
  • *****
  • Posts: 1415
    • UVviewsoft
Re: TreeView Nodes text translation
« Reply #1 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.

jcmontherock

  • Jr. Member
  • **
  • Posts: 78
Re: TreeView Nodes text translation
« Reply #2 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.
« Last Edit: July 01, 2021, 07:14:44 pm by jcmontherock »

 

TinyPortal © 2005-2018