Is it possible to remove/delete entries on the item menu

This is the place to ask "How do I ...?"
Post Reply
brunoisa10
Posts: 88
Joined: Sun Jan 27, 2019 7:31 pm
Location: Westende Belgium

Is it possible to remove/delete entries on the item menu

Post by brunoisa10 » Sat Mar 09, 2019 3:34 pm

As it's possible to add using menu.addMainItem

Is it possible to add menu.removeMainItem ?

How are you doing for Chronometer or Clock ? Where there is only Reset and Settings
Bruno 8-)

User avatar
TrianguloY
Posts: 107
Joined: Thu Jan 24, 2019 9:46 am

Re: Is it possible to remove/delete entries on the item menu

Post by TrianguloY » Sat Mar 09, 2019 3:41 pm

There isn't, no. However if you don't want an entry, just don't add it.

Unless you want to remove the lightning existing entries.

You can use this to remove all of them:
menu.getMainItemsView().removeAllViews();

But removing only a specific one...that's harder.

brunoisa10
Posts: 88
Joined: Sun Jan 27, 2019 7:31 pm
Location: Westende Belgium

Re: Is it possible to remove/delete entries on the item menu

Post by brunoisa10 » Sat Mar 09, 2019 4:03 pm

All is a very good start for me. Thanks
Bruno 8-)

brunoisa10
Posts: 88
Joined: Sun Jan 27, 2019 7:31 pm
Location: Westende Belgium

Re: Is it possible to remove/delete entries on the item menu

Post by brunoisa10 » Sat Mar 09, 2019 5:01 pm

I think it's fine with remove all.
Thanks a ton
Bruno 8-)

Post Reply