Error assigning Caption with Inc

Asked

Viewed 34 times

1

I have a LISTVIEW component, in it are inserted several records. I need to generate Auto Increment code in the Caption of this listview according to the number of inserted records. I tried something like:

l := l + 1;
Item.Caption := Inc(l,1);

It does not accept the error. Any suggestions ?

  • To make the content more useful to future visitors, could [Dit] the question to include the error message that appeared? Thank you.

1 answer

1

I already solved, for those who are interested or have the same problem, do the following:

    l := l + 1;
   Item.Caption := inttostr(l);

Browser other questions tagged

You are not signed in. Login or sign up in order to post.