I am struggeling with a simple tree view, I look throw some examples on previous questions answered..but still struggeling...
I want to create a menu with a tree view. Here is a example of my menu...
.... a * indicate a parent, and this parent has children, if a click a parent it must expand all its children.
IF a parent has children then the parent must not call any sub program, it must act only as the parent nothing else.
BUT if a item in my treeview has no children then it must act as a child and must call a subprogram..
(NOW if a click on B then B must show it children and b1,b2,b3 must call a program when i click on it)
(If a click on A or C or E or F then these nodes must call a program)
*** B must not do anything it must just expand......
I use the unique index here is a exapmle of my code....
procedure TfrmMainMenu.tvAdminChange(Sender: TObject; Node: TTreeNode);
case tvAdmin.Selected.AbsoluteIndex of
0 : LoadApplication('prjAlterOwnerDetails.exe');
1 : LoadApplication('prjManTimeShareUsage.exe');
3 : LoadApplication('prjEnqUnitWeek.exe');
4 : LoadApplication('prjEnqLevyAcc.exe');
5 : LoadApplication('prjExcGuestLookup.exe');
**** MY PROBLEM IS Sometimes when a click on a parent the + sign to expand it, then it calls the onchange event and calls the first item in my treeview....
AND THIS I DONT KNOW HOW TO FIX OR HOW TO USE THE TREE VIEW CORRECTLY..
please help me how to get this tree view to work correctly on the correct item which I CLICK.