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

北慕城南 提交于 2019-12-13 04:25:31

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!