Is such behavior okay? I was quite upset until I found out this fact.
Ok, I search our entire TMS VCL UI Pack codebase and nowhere ClearAdvGridDropDown method can be found.
It's all me
procedure TAdvGridDropDownHelper.ClearAdvGridDropDown;
var
I: Integer;
begin
Self.Items.BeginUpdate;
try
Self.Clear;
FreeAndNilGridObjects;
for I := 0 to Self.Items.Count -1 do
Self.Items[I].Text.Clear;
Self.Items.Clear;
Self.Text := '';
Self.SetDropDownHeight;
finally
Self.Items.EndUpdate;
end;
end;
procedure TAdvGridDropDownHelper.FreeAndNilGridObjects;
var
Obj: TObject;
I: Integer;
begin
for I := Self.Items.Count -1 downto 0 do
begin
if Self.Items[I].Text.Count > 0 then
begin
Obj := Self.Items[I].Text.Objects[0];
Obj.Free;
end;
end;
end;
I suspect your code Self.Text := '' triggers this.