inapathtolearn
inapathtolearn

Reputation: 75

Searching an item in a TcxTreeList in Borland C++ Builder 6

I am using C++ Builder 6. I have a TreeList with two columns and a TrzEdit and a Search Button. I want to find the item which i will type in the Edit field once i type something in the box. How can I display it?

void __fastcall TMainForm::BtnSearchClick(TObject *Sender)
{
  for (TcxTreeListNode* node = TreeList->TopNode ; node != NULL; node = node->GetNext())

  {
        String value = node->Values[PropertyName->ItemIndex];

        if ( value == Search->Text.c_str())
        {
          ShowMessage("Foundit");
        }
   }
}

Can someone please give an insight on how to do this? It works so far. I want to display all the items which matches the query keyword (even partialy)

I can find help with the new builder, but not the old one which i am using.

Is it possible with Tcxtreelist to make a node 'Visible' once a condition is matched and then mak eit invisible once the edit box is cleared. Does such functionality exists?

Upvotes: 0

Views: 392

Answers (0)

Related Questions