Caption and Hint for those componets creating at run time

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

Caption and Hint for those componets creating at run time

Post by manielan »

Hi there,
I'm using siLangRT first time and this may be asked before.
This my requirement.
My application will create many TbitButtons in my main form based on the Database field. How can I show the Caption and Hints at run-time according to the selected language?

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

Post by isiticov »

Hello,

You can set Caption and Hint property for these run-time created components in code using GetTextOrDefault() method of TsiLang and provide these strings in Strings list of TsiLang.
If you describe a little bit detailed what is needed we would try to provide you more detailed description.
Best regards,
Igor Siticov.
manielan
Posts: 6
Joined: Tue Sep 30, 2008 12:06 am

Post by manielan »

Thanks for the quick response. This is what I'm doing.
Create buttons at run-time with the captions and hints taken from database. For example

While not MyADOQry.EOF do begin
TbitButton.Caption := MyADOQryBtnCaption.AsString;
TbitButton.Hint := MyADOQryBtnHint.AsString;
....
....
MyADOQry.Next
end; //while

How can I switch the caption when the user switch the language?
How to advise my enduser to translate?
I'm using siLangRT for the end-user to maintain the translation.

Hope I'm clear this time around.

Regards
-Elan
Post Reply