Jump to content

convert TMainmenu Items to Treeview problem


Guest

Recommended Posts

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

 

 

 

Link to comment
Share on other sites

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) );

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...