BUGREPORT? comboboxes loose their item index

This forum designated to discuss the TsiLang Components Suite.
Post Reply
grumbler
Posts: 8
Joined: Tue Dec 30, 2003 1:24 pm

BUGREPORT? comboboxes loose their item index

Post by grumbler »

after changing activelanguage some translated comboboxes loose their item index (-1)

isiticov
Site Admin
Posts: 2207
Joined: Thu Nov 21, 2002 3:17 pm

Post 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.

grumbler
Posts: 8
Joined: Tue Dec 30, 2003 1:24 pm

Post by grumbler »

it's tflatcombobox
TFlatComboBox = class(TCustomComboBox)

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

isiticov
Site Admin
Posts: 2207
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

Will be fixed.

pieter_schollaert
Posts: 3
Joined: Wed Dec 07, 2011 2:05 pm

Post 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

isiticov
Site Admin
Posts: 2207
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

All TCustomComboBox descendants handled. It looks like TcxCombobox is not a descendant of TCustomCombobox. We will to fix this.

delphi@tomsoft.hr
Posts: 2
Joined: Tue May 26, 2015 7:04 am

Post 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 ?

isiticov
Site Admin
Posts: 2207
Joined: Thu Nov 21, 2002 3:17 pm

Post 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.

delphi@tomsoft.hr
Posts: 2
Joined: Tue May 26, 2015 7:04 am

Post 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.

isiticov
Site Admin
Posts: 2207
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

We will try to find a fix for this.

StefanP
Posts: 8
Joined: Mon Jul 18, 2005 7:45 am

Post 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

isiticov
Site Admin
Posts: 2207
Joined: Thu Nov 21, 2002 3:17 pm

Post 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.

StefanP
Posts: 8
Joined: Mon Jul 18, 2005 7:45 am

Post 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

Post Reply