Jump to content

Recommended Posts

Posted

Hello!

I must work with UniTreeMenu and UniMenuItems in RunTime.

What I want?

I want execute this is actions:

  1. Clear RunTime items of UniMenuItems. Why in UniMenuItems? Because UniMenuItems having need to me a property as is UniMenuItem.Tag.
  2. In RunTime I want create items in UniMenuItems and this is items will see in UniTreeMenu. It's need me that when I make click on item in UniTreeMenu - I give value from UniMenuItems.Tag. Where UniTreeMenu.SourceMenu=UniMenuItems.

I can't found answer on my question on forum. Because, for example, UniTreeMenu.Items.Clear not delete all items from tree.

Posted
39 minutes ago, Артем said:

1528.

OK, can you please open a ticket in the support portal?

You can try this approach for now:

procedure TMainForm.UniButton1Click(Sender: TObject);
begin
  with UniTreeMenu1 do
  begin
    JSInterface.JSCode(#1'.getStore().each(function(item){item.remove()});');
    Items.Clear;
  end;
end;

 

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