?
Solved

Multiselect on Tlistview

Posted on 1998-02-23
2
Medium Priority
?
270 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 400 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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying 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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses
Course of the Month11 days, 22 hours left to enroll

752 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