Page 1 of 1

retreiving original text out of a multiline

Posted: Thu Jun 29, 2006 11:15 am
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

Posted: Thu Jun 29, 2006 1:53 pm
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.

Posted: Thu Jun 29, 2006 2:21 pm
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

Posted: Thu Jun 29, 2006 3:56 pm
by isiticov
Yes, you will need to extract needed item from retrieved text.

Posted: Fri Jun 30, 2006 8:28 am
by cdsnl
thanks
andre