Index from Caption in ListView

Posted on 2008-11-04
Last Modified: 2013-11-17
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

Question by:Lubker
    1 Comment

    Accepted Solution

    Ive found a solution:
    ToolView->Items->IndexOf(ToolView->FindCaption(0,AnsiString("Type ToolId1"),False, True, False))

    Open in new window


    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Join & Write a Comment

    Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
    How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from ( Go to that link and select download selenium in the right hand columnThat will then direct you to their downlo…
    THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
    The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.

    728 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

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now