I just learned how to create a listview, but I didn't actually do it. Ask Delphi/Windows SDK/API
Http://www.delphi2007.net/DelphiBase/html/delphi_20061219095103119.html
What smallimages do not know how to fill in the limit?
Item:
Data,
Imageindexa
Listview1.additem (? String ?,??)
Here is an example.
It was very convenient to build petabytes in the past. It is easy to refer to the Help file.
The PB help file is much better than Delphi.
VaR
Vlistitem: tlistitem;
Begin
Listview1.smallimages: = imagelist1;
Vlistitem: = listview1.items. Add; // Add an item
Vlistitem. Caption: = 'zswang pass ';
Vlistitem. imageindex: = 0;
Vlistitem. Data: = pointer (100 );
End;
What is the type of imagelist1, pointer (100), how should we declare it, and assign the initial value?
Imagelist1 I understand. Let's talk about pointer (100 ).
Pointer is a pointer type, which is forced conversion.
I have a string variable S.
How to assign to vlistitem. Data
If vlistitem. Data: = pointer (s );
I have a string variable S.
How to assign to vlistitem. Data
If vlistitem. Data: = pointer (s );
->
Why not vlistitem. subitems. Add (s );
Can you tell me how to assign a value to a string?
Vlistitem. Data?
Use tobject for forced conversion