Auto refresh the caption with GetTextOrDefault()

All announcements, questions and issues related to the TsiLang Components Suite.
Post Reply
manielan
Posts: 6
Joined: Tue Sep 30, 2008 12:06 am

Auto refresh the caption with GetTextOrDefault()

Post by manielan »

Hi Experts,
I'm creating buttons during run time whose captions are retrieved from database. I use GetTextOrDefault() to display the correct language text during the creation. But when the user change the language, all those created during design time are reflecting the correct text except those created at runtime. Do I have to scan the whole form for run time components and change the caption? is there any automated way?

Regards
Elan
isiticov
Site Admin
Posts: 2383
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

Hello,

Yes, the only way to achieve this is to scan the components and re-apply the caption to them. You can easily create a procedure for this, that will iterate through all the components in Components property of the form and re-apply the caption there.
Best regards,
Igor Siticov.
Post Reply