Guest Posted December 11, 2010 Share Posted December 11, 2010 Message from: "koney" hi, I want convert my TMainmenu Items to Treeview but got a error a = following. [Error] Main.pas(85): E2010 Incompatible types: 'TUniMenuItem' and = 'TMenuItem' how can I resolve the problem ? procedure TMainForm.SetTree(node: TuniTreeNode; menu:TuniMenuItem); var i: word; begin if menu.Count =3D 0 then exit; for i :=3D 0 to menu.Count-1 do SetTree(NavTreeView.Items.AddChild(node, menu.Items.Caption), = menu.Items); end; __________ Information from ESET Smart Security, version of virus signature= database 5693 (20101210) __________ The message was checked by ESET Smart Security. http://www.eset.com Quote Link to comment Share on other sites More sharing options...
Guest Posted December 11, 2010 Author Share Posted December 11, 2010 Message from: "Farshad Mohajeri" "koney" wrote in message = news:iZ0eTEOmLHA.2084@anaxagvs227... hi, I want convert my TMainmenu Items to Treeview but got a error a = following. [Error] Main.pas(85): E2010 Incompatible types: 'TUniMenuItem' and = 'TMenuItem' how can I resolve the problem ? procedure TMainForm.SetTree(node: TuniTreeNode; menu:TuniMenuItem); var i: word; begin if menu.Count =3D 0 then exit; for i :=3D 0 to menu.Count-1 do SetTree(NavTreeView.Items.AddChild(node, menu.Items.Caption), = menu.Items); end; try this: SetTree(NavTreeView.Items.AddChild(node, menu.Items.Caption), = TuniMenuItem(menu.Items) ); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.