Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 423331
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T19:10:11+00:00 2026-05-12T19:10:11+00:00

IDE: Delphi 1 16-bit (Yeah it’s old, no I can’t afford a newer version

  • 0

IDE: Delphi 1 16-bit (Yeah it’s old, no I can’t afford a newer version or the hardware needed to run it. Besides I’m just learning Delphi so it serves the purpose fine.)

I’ve loaded a TOutline with names (to represent an address book). They’re in sorted order. I want to be able to search the outline.

Possible searches:

  1. the whole name (eg. Frank Allan Smith)
  2. a partial name (eg. Allan)

What’s a good, fast way to search the outline?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T19:10:11+00:00Added an answer on May 12, 2026 at 7:10 pm

    For the sorted list, you can use a binary search for your “BEGINS WITH”, but for the contains, you will need to do a linear search (evaluating every item). Its been awhile since I’ve worked with Delphi 1, but here is the linear search:

    The linear search:

    function OutlineContains(aOutline:tOutline;aText:string;Repos:boolean):boolean;
    var
      aSearch : string;
    begin
      Result := false;
      aSearch := uppercase(aText);
      for I := 0 to aOutline.Lines.Count-1 do
      begin
        if Pos(aSearch,Uppercase(aOutline.Lines.Text[i])) <> 0 then
          begin
            Result := true;
            if Repos then
              aOutline.SelectedIndex := i;
            exit;
          end;
      end;
    end;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In the Delphi IDE, you can hold control and click on a method to
For Delphi IDE, Is there any tool/expert to know the name of the function
When using Delphi IDE, it will silently change SQLConnection.Connected to true when populating field
I've used several Versions of the Delphi IDE for many years. When I'm using
Nevrona Designs' Rave Reports is a Report Engine for use by Embarcadero's Delphi IDE.
I'm quite used to my IDE setup in Delphi 7, where I have my
I have a very strange problem with the Delphi 2006 IDE. If the IDE
Is there a good code snippets application for Delphi or general purpose with IDE
IDE: Microsoft Visual Studio Professional 2008 Language: C# Background: I have one form and
My IDE crashes any time I try add a new component to the toolbar.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.