begin
ListView1.ItemIndex := 0;
Image1.Bitmap.Assign(ListView1.Items[0].Bitmap);
+ Randomize;
end;
end;
end;
then
begin
s := Image1.Children[i];
- (s as TEffect).Enabled:=true;
+ (s as TEffect).Enabled := true;
FloatAnimation1.Parent := s;
SetObjectProp(s, 'target',
ListView1.Items[ListView1.ItemIndex + 1].Bitmap);
procedure TForm1.Button3Click(Sender: TObject);
var
- i: integer;
+ i: Integer;
begin
- for i := ListView1.Items.Count-1 downto 0 do
+ for i := ListView1.Items.Count - 1 downto 0 do
if ListView1.Items[i].Checked = true then
ListView1.Items.Delete(i);
end;
end;
procedure TForm1.MenuItem8Click(Sender: TObject);
+var
+ s: string;
+ i: Integer;
begin
+ if ComboBox1.Items.Count > 0 then
+ s := ComboBox1.Items[ComboBox1.ItemIndex];
if Form2.ShowModal = mrOK then
+ begin
ComboBox1.Items.Assign(Form2.ListBox2.Items);
+ i := ComboBox1.Items.IndexOf(s);
+ if i > -1 then
+ ComboBox1.ItemIndex := i
+ else if ComboBox1.Items.Count > 0 then
+ ComboBox1.ItemIndex := 0;
+ end;
end;
end.