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

I have consistently had IDE problems in Delphi/C++Builder for years, with every version. I
I'm migrating a Delphi project from old Delphi 2.0 IDE to the new RAD
Is there any way that I can have the Delphi IDE auto-save all opened
I don't have the Delphi IDE installed. Can I still design forms?
This is a follow up to How can I get the Delphi IDE's Main
I know I can use the IDE settings in Delphi Pro 6 to stop
How can I detect if my application is running under the IDE Delphi 2007
In the Delphi IDE, you can hold control and click on a method to
There is a feature in Delphi IDE (Borland Developer Studio 2006) which allows to
HI, I want to write a small Delphi IDE Expert for D2007-D2009 (aka. Galileo

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.