问题
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?
来源:https://stackoverflow.com/questions/58267358/searching-an-item-in-a-tcxtreelist-in-borland-c-builder-6