Solved

Multiselect on Tlistview

Posted on 1998-02-23
2
264 Views
Last Modified: 2010-04-04
I'm using TListView in an application and I am having problems using multiselection.

I have a Tlist of n listviews. When creating the second listview I get a RT error "A component called _1 already exists" ???
0
Comment
Question by:spaceboy
2 Comments
 
LVL 5

Expert Comment

by:ronit051397
ID: 1359698
When creating new, Do you give it a name?
0
 

Accepted Solution

by:
bijoyn earned 200 total points
ID: 1359699
Hello SpaceBoy,

I ma not sure of what u are doing, but try this code. Maybe it will solve your problem.

-------------
type
  ListRecord = record
    FListView   :  TListView;
  end;

  PTRToList  = ^ListRecord;

  TForm1 = class(TForm)
    procedure FormShow(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
      FList          :  TList;
      Ptr_ListView   :  PTRToList;
  end;

var
  Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.FormShow(Sender: TObject);
var
   i_count  :  Integer;
begin
   FList := TList.Create;
   for i_count := 0 to 10 do
   begin
      New(Ptr_ListView);
      FList.Add(Ptr_ListView);
   end;
   ShowMessage(Inttostr(Flist.count));
end;

end.
-------------------

I hope it solves your problem.

Bijoy
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Delphi: how to send PJL commands to printer 3 109
Intraweb download file link ? 1 156
Print Graphic and Text to Epson TM-T88v 12 389
Performance of SQL statement 37 127
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question