retreiving original text out of a multiline

All announcements, questions and issues related to the TsiLang Components Suite.
Post Reply
cdsnl
Posts: 12
Joined: Mon Aug 23, 2004 12:41 pm

retreiving original text out of a multiline

Post by cdsnl »

Hi,

I have a TCombobox with several items in English. I have translated the items also in Dutch in Multilines. This all works fine.

But now I need the original english text of the selected item and not the Dutch one. Without putting ActiveLanguage to 1.

I have tried it with
cField:=siLang1.GetStringValue(@siLang1.MultiLines, cbxSearchOn.text, 1);

But that does not work.

Any ideas?

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

Post by isiticov »

You just need to use it as the following:

Code: Select all

cField := siLang1.GetStringValue(siLang1.MultiLines, 'cbxSearchOn.Items', 1); 
The second parameter is the ID of string in TsiLang's list (and I suppose cbxSearchOn.Items points to Items property of your combobox). This will return you the content of Items property for the first language.
Best regards,
Igor Siticov.
cdsnl
Posts: 12
Joined: Mon Aug 23, 2004 12:41 pm

Post by cdsnl »

Thanks Igor,

It works so far that I get a string with all the items. It is also possible to get only the value which is selected or do I have to get it myself using the cbxSearchOn.ItemIndex.

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

Post by isiticov »

Yes, you will need to extract needed item from retrieved text.
Best regards,
Igor Siticov.
cdsnl
Posts: 12
Joined: Mon Aug 23, 2004 12:41 pm

Post by cdsnl »

thanks
andre
Post Reply