Page 1 of 1

Caption and Hint for those componets creating at run time

Posted: Tue Sep 30, 2008 3:54 pm
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

Posted: Tue Sep 30, 2008 5:05 pm
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.

Posted: Thu Oct 02, 2008 8:00 am
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