• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 874
  • Last Modified:

Index from Caption in ListView

I have a little properly simple problem.
I have a ListView in Borland C++ Builder 2006, where I know the value of a caption and need the index instead or the value of the first subitem.
I thought it was I could do it like:
But unfortunately I get the error E2034 Cannot convert 'char *' to 'TListItem *' . What do I do wrong?

int Varindex = ToolView->Items->IndexOf("my caption");

Open in new window

0
Lubker
Asked:
Lubker
1 Solution
 
LubkerAuthor Commented:
Ive found a solution:
ToolView->Items->IndexOf(ToolView->FindCaption(0,AnsiString("Type ToolId1"),False, True, False))

Open in new window

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now