Jump to content
xorpas

Create a new Animate from listviewitem PlaceOffset not work How do it ?

Recommended Posts

Hi

I have a problem to animate an item in listview in the PlaceOffset ,How can Do it 

Like This image

 

 

Thank's

Sans titre.png

Share this post


Link to post

Is their a way ,Some thing Like this

 

var item:TListViewItem;
txt:TListItemText;
begin
 item:=ListView1.Items.Add;
 item.Data['Text1']:='hellow word';
 txt:=ListView1.Items[0].Objects.FindObjectT<TListItemText>('Text1');
 TAnimator.AnimateFloat(ListView1 , txt.PlaceOffset.X.ToString , 500, 1);
// TAnimator.AnimateFloat(ListView1 , 'Position.x', 500, 1);

end;

 

  • Like 1

Share this post


Link to post

Since none of us are mind readers, a description of what you want to achieve could be useful.

What action should lead to what effect, and when?

  • Like 1

Share this post


Link to post

Thank 's for replay

I want to change a position X and Y of item  in listview from

position.X  = -56 to position.X = 144

  and

position.Y  = 16 to position.Y  =96

 

More Explain in image Hier

 

 

39361445_Sanstitre.thumb.png.e77f24689ecb5e4226ce80514d43eb4f.png

Share this post


Link to post

I can do it without animation Like this

 

procedure TForm1.Button1Click(Sender: TObject);
var item :TListViewItem;
begin
ListView1.Items.Clear;
   item:=ListView1.Items.Add;
  item.Data['Text1']:='Animate Me in postion  x =136 y =256 ';
//  PlaceOffset.X:=8;
//  PlaceOffset.Y:=8;
  item.Objects.FindObjectT<TListItemText>('Text1').PlaceOffset.X:=136;
 item.Objects.FindObjectT<TListItemText>('Text1').PlaceOffset.y:=256;
end;

procedure TForm1.Button2Click(Sender: TObject);
var item :TListViewItem;
begin
ListView1.Items.Clear;
   item:=ListView1.Items.Add;
  item.Data['Text1']:='Animate Me in postion  x =8 y =8';
 item.Objects.FindObjectT<TListItemText>('Text1').PlaceOffset.X:=8;
 item.Objects.FindObjectT<TListItemText>('Text1').PlaceOffset.y:=8;
end;

But How can Do it With TFloatanimation

1559417431_Sanstitre.png.3028aa185bc03faf084700875e415a6e.png

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×