Page 1 of 1

BUGREPORT? comboboxes loose their item index

Posted: Fri Jan 16, 2004 2:42 pm
by grumbler
after changing activelanguage some translated comboboxes loose their item index (-1)

Posted: Fri Jan 16, 2004 4:19 pm
by isiticov
May be this is not TComboBox descendants but some other 3rd party combobox components? Because TsiLang explicity saves/restores TComboBox and its descendants ItemIndex during translating.

Posted: Tue Jan 20, 2004 10:59 am
by grumbler
it's tflatcombobox
TFlatComboBox = class(TCustomComboBox)

m/b it will be better to check cast with TCustomComboBox, nor with TComboBox?

Posted: Tue Jan 20, 2004 3:05 pm
by isiticov
Will be fixed.

Posted: Thu Dec 22, 2011 12:29 pm
by pieter_schollaert
Hello,

We are experiencing the same problem with the TcxCombobox of DevExpress. Is this issue related to the TFlatComboBox problem above ? And has this issue been solved for the TFlatComboBox as promised ?

Regards,

Pieter

Posted: Sat Dec 24, 2011 7:03 am
by isiticov
All TCustomComboBox descendants handled. It looks like TcxCombobox is not a descendant of TCustomCombobox. We will to fix this.

Posted: Wed May 27, 2015 7:24 am
by delphi@tomsoft.hr
isiticov wrote:All TCustomComboBox descendants handled. It looks like TcxCombobox is not a descendant of TCustomCombobox. We will to fix this.
Is this fixed? It doesnt work for us in DelphiXE.
Is there a workaround for this problem ?

Posted: Wed May 27, 2015 8:41 am
by isiticov
Do you mean it doesn't work for some DevEx combobox? For regular combobox it works 100%. As a workaround you can always store ItemIndex before switching language and set it back after.

Posted: Wed May 27, 2015 8:59 am
by delphi@tomsoft.hr
It doesnt work for DevEx combobox.
Problem is not on one form and one combo, but multiple forms and combos.
I guess it could be done, but maybe better place to fix it is at translation level.

Posted: Fri May 29, 2015 10:07 am
by isiticov
We will try to find a fix for this.

Posted: Thu Oct 06, 2016 1:52 pm
by StefanP
Any news on this one? Any workaround?

I'm seeing the same problem for all cxComboBoxes with property DropDownListStyle=IsFixedList

It seems TsiLang sets the Text property of the cxComboBox to the new language. Then the cxComboBox searches this value within its Items, doesn't find it and as a result sets ItemIndex to -1 because IsFixedList doesn't allow values not contained in the Items list.

Regards
StefanP

Posted: Fri Oct 07, 2016 3:34 am
by isiticov
Hello,

If this is the case then as a solution could be just to exclude cxComboBox.Text property from translation (as it could be included automatically) and it will be translated by translating Items property content.

Posted: Fri Oct 07, 2016 8:03 am
by StefanP
Excluding cxComboBox.Text does not help.
As there are OnChange events defined the whole picture gets a bit complicated. I'll run further tests when I find the time...

For now I have changed language switching from immediate switching to "Switch at next program start". That is sufficient for my users and works around the problems.

Thanks
StefanP