Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Multiselect on Tlistview

Posted on 1998-02-23
2
Medium Priority
?
274 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: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
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…
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…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

618 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