Board index » cppbuilder » treeview question
N. Karademir
![]() CBuilder Developer |
treeview question2003-08-26 05:41:47 PM cppbuilder27 Hi, i use next code: void OpenReport(AnsiString MyString ) { if(MyString == "MYITEM") { ShowMessage(" item found" ); } } void __fastcall TfrmReports::TreeView1Click(TObject *Sender) { TTreeNode *ATreeNode; ATreeNode= TreeView1->Selected; if (ATreeNode->Parent != 0 ) { if (ATreeNode->Parent->Text == "Algemeen") { OpenReport(ATreeNode->Text, ); } } } i have the next treeview Algemeen Mystring Otherstring Justonother string hello Mystring1 Mystring2 Mystring3 etc.etc. the code work ok, if i press Algemeen->MyString the messagebox is shown. if i press onother string there is no messagebox. but after i pressed Algemeen->MyString i click on the plus sign (+) from another node, this time the messagebox is shown to. how can i solve this? mvg |