Надо оживлять тему
очередной глюк
В методе TCustomComboBox.SetItemIndex файлы CustomComboBox.INC необходимо добавить
проверку - отмечено символами >>>
procedure TCustomComboBox.SetItemIndex(Val : integer);
begin
//if CompareText(Name,'TextToFindComboBox')=0 then
// debugln('TCustomComboBox.SetItemIndex A ',DbgSName(Self),' Text="',Text,'"');
if Val=GetItemIndex then exit;
if Val>=Items.Count then exit;
FItemIndex:= Val;
//if (FItemIndex>=0) and (not (csLoading in ComponentState)) then
// Text:=FItems[FItemIndex];
if HandleAllocated then
begin
TWSCustomComboBoxClass(WidgetSetClass).SetItemIndex(Self, FItemIndex);
end else begin
// remember text, in case one reads text without creating handle
>>> if (FItemIndex>=0) and (FItemIndex < FItems.Count) then
Text := FItems.Strings[FItemIndex]
>>> else
>>> Text := '';
end;
//if CompareText(Name,'TextToFindComboBox')=0 then
// debugln('TCustomComboBox.SetItemIndex END ',DbgSName(Self),' Text="',Text,'"');
end;