【发布时间】:2012-02-19 23:31:19
【问题描述】:
以下代码很好地动画化了将新字符串添加到 ListBox 的末尾
procedure TForm6.AddItem(s: string);
var
l : TListBoxItem;
OldHeight : Single;
begin
l := TListBoxItem.Create(Self);
l.Text := s;
OldHeight := l.Height;
l.Height := 0;
l.Parent := ListBox1;
l.Opacity := 0;
l.AnimateFloat('height', OldHeight, 0.5);
l.AnimateFloat('Opacity', 1, 0.5);
end;
项目扩展并淡入。但是我希望能够将字符串添加到 ListBox 中的任意位置 - 实际上是当前 ItemIndex。 有人知道怎么做吗?
【问题讨论】:
标签: delphi animation listbox firemonkey tlistbox