DEV_THS Posted December 2, 2019 Share Posted December 2, 2019 UniTreeMenu1.Items.Clear () does not work. after this command the menu still shows the items on the screen I need this feature because the menu is dynamic and is loaded according to database. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 2, 2019 Share Posted December 2, 2019 1 hour ago, DEV_THS said: UniTreeMenu1.Items.Clear () does not work. after this command the menu still shows the items on the screen I need this feature because the menu is dynamic and is loaded according to database. I will check. Quote Link to comment Share on other sites More sharing options...
albertovesx Posted December 3, 2019 Share Posted December 3, 2019 Try UniTreeMenu.refresh. Quote Link to comment Share on other sites More sharing options...
DEV_THS Posted December 4, 2019 Author Share Posted December 4, 2019 I already tried the refresh method and it didn't work either Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 6, 2019 Share Posted December 6, 2019 On 12/2/2019 at 7:17 PM, DEV_THS said: UniTreeMenu1.Items.Clear () does not work. Can you try this approach? procedure TMainForm.UniButton1Click(Sender: TObject); begin with UniTreeMenu1 do begin JSInterface.JSCode(#1'.getStore().each(function(item){item.remove()});'); Items.Clear; end; end; Quote Link to comment Share on other sites More sharing options...
DEV_THS Posted December 9, 2019 Author Share Posted December 9, 2019 worked correctly. thanks 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.