Jump to content

Recommended Posts

Posted
I can´t add a item in runtime. I'm use this code in the "tmenu" example:
 
procedure TMainForm.UniToolButton9Click(Sender: TObject);
begin
    UniTreeMenu1.Items.AddChild(nil,'Test');
end;
 
 
 
Error message with the SourceMenu property of TUniTrreMenu1 set:
 
 
post-4732-0-68481700-1526676012_thumb.png
 
Error message without the SourceMenu property of TUniTrreMenu1 set: 
 
post-4732-0-93253200-1526675986_thumb.png
 
 
Regards,
 
Posted

Farshad,

this issue was fixed, but now I have others:

 

I'm trying to replace TuniTreeView with TuniTreeMenu in the demo "AllFeaturesDemo"

 

1.- UniTreeMenu1.Items.Clear() does not work, throws the following ajax error: "Cannot set property 'lastOptions' of undefined"

 

vUniTreeNode := UniTreeMenu1.Items.AddChild(nil, 'Text');

 

2.- vUniTreeNode .Visible := true does not work, it does not do anything.

3.- vUniTreeNode .Expanded := aExpand does not work, throws the following ajax error: "Cannot set property 'getNodeById' of undefined".

4.- vUniTreeNode.ImageIndex := 1 does not work, throws the following a ajax error.

 

Regards,

  • Upvote 2
  • 4 weeks later...
Posted

Farshad,

this issue was fixed, but now I have others:

 

I'm trying to replace TuniTreeView with TuniTreeMenu in the demo "AllFeaturesDemo"

 

1.- UniTreeMenu1.Items.Clear() does not work, throws the following ajax error: "Cannot set property 'lastOptions' of undefined"

 

vUniTreeNode := UniTreeMenu1.Items.AddChild(nil, 'Text');

 

2.- vUniTreeNode .Visible := true does not work, it does not do anything.

3.- vUniTreeNode .Expanded := aExpand does not work, throws the following ajax error: "Cannot set property 'getNodeById' of undefined".

4.- vUniTreeNode.ImageIndex := 1 does not work, throws the following a ajax error.

 

Regards,

 

 

Same issue even with the last version of Unigui

  • Administrators
Posted

TUniTreeMenu was initially designed as static menu. Unlike a TreeView which is more dynamic a TreeMenu is more static in this regard. I know that Delphi developers are always in seek of manipulating everything at runtime. A habit which comes from VCL programming. Something that is less common in web programming. In time we will add more dynamic capability to TreeMenu, but as I said it was meant to work as a simple static menu placed on left of your screen.

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...