
Quote from asmat on May 13, 2021, 4:02 amHi luis, we can add an item to the menu with this command:
neoMenuAddItem "menu" "item 1" "" "mySubroutine" "First item"Is there any way to remove an item from the menu?
Hi luis, we can add an item to the menu with this command:
neoMenuAddItem "menu" "item 1" "" "mySubroutine" "First item"
Is there any way to remove an item from the menu?

Quote from luishp on May 13, 2021, 11:21 am@asmat, I don't think so. Anyway you can take a look at the original JavaScript library:
https://github.com/dgoguerra/bootstrap-menuLet me know if you find any possibility.
Thank you!
@asmat, I don't think so. Anyway you can take a look at the original JavaScript library:
https://github.com/dgoguerra/bootstrap-menu
Let me know if you find any possibility.
Thank you!
Quote from Gaev on May 13, 2021, 3:13 pm@asmat
@luishpIs there any way to remove an item from the menu?
Let me know if you find any possibility.If you can live with the menu item NOT be shown/visible to the user (as opposed to being removed from the chain) ... on this page ... https://github.com/dgoguerra/bootstrap-menu ... it says (near the bottom) that isShown is a (function) attribute ... perhaps a commands like neoMenuHideItem and neoMenuShowItem could be developed.
There is also a (function) attribute called isEnabled ... if neoMenu is enhanced, neoMenuEnableItem and neoMenuDisableItem could be developed too.
Is there any way to remove an item from the menu?
Let me know if you find any possibility.
If you can live with the menu item NOT be shown/visible to the user (as opposed to being removed from the chain) ... on this page ... https://github.com/dgoguerra/bootstrap-menu ... it says (near the bottom) that isShown is a (function) attribute ... perhaps a commands like neoMenuHideItem and neoMenuShowItem could be developed.
There is also a (function) attribute called isEnabled ... if neoMenu is enhanced, neoMenuEnableItem and neoMenuDisableItem could be developed too.

Quote from luishp on May 13, 2021, 4:59 pm@gaev @asmat I have attached neoMenu plugin source code.
I'm quite overwhelmed lately with projects but will try to assist you if you need me.
Best regards.
@gaev @asmat I have attached neoMenu plugin source code.
I'm quite overwhelmed lately with projects but will try to assist you if you need me.
Best regards.

Quote from asmat on May 14, 2021, 12:36 amThank you @luis and @gave, I have added new two commands as below:
neoMenuIsShowItem "menu2" true 2 neoMenuIsEnableItem "menu2" false 1
Thank you @luis and @gave, I have added new two commands as below:
neoMenuIsShowItem "menu2" true 2 neoMenuIsEnableItem "menu2" false 1
Uploaded files:
Quote from Gaev on May 14, 2021, 2:39 am@asmat
Congratulations.
When I tested it ...
1) I found this anomaly ...
neoMenuIsEnableItem "menu2" false 1
This command by itself will show a horizontal line for the item that is disabled.
You need to invoke the additional command neoMenuIsShowItem "menu2" false 2 in order to not show the horizontal line.
I would have liked to see the disabled item's text be shown "greyed out" ... but nothing we can do about the way the javascript library reacts.
However, it might be best to invoke the neoMenuIsShowItem "menu2" false 2 functionality automatically as part of the neoMenuIsEnableItem "menu2" false 2 command ... saves the developer from doing so.
2) In order to make things consistent with the way other objects (widgets) are managed, may I suggest command formats like ...
neoMenuHideItem "menu2" 1
neoMenuShowItem "menu2" 1
neoMenuDisableItem "menu2" 1
neoMenuEnableItem "menu2" 1
3) This one is debatable, and I will let @luishp make the final decision.
Unlike VisualNEOWin, and in keeping with javascript convention, the item reference numbers (which are references to the array item), start at zero ... might be a bit confusing when the item text in the sample App refer to numbers starting with 1
So, it is debatable whether we should refer to items as 0, 1, 2 etc. or 1, 2, 3
Congratulations.
When I tested it ...
1) I found this anomaly ...
neoMenuIsEnableItem "menu2" false 1
This command by itself will show a horizontal line for the item that is disabled.
You need to invoke the additional command neoMenuIsShowItem "menu2" false 2 in order to not show the horizontal line.
I would have liked to see the disabled item's text be shown "greyed out" ... but nothing we can do about the way the javascript library reacts.
However, it might be best to invoke the neoMenuIsShowItem "menu2" false 2 functionality automatically as part of the neoMenuIsEnableItem "menu2" false 2 command ... saves the developer from doing so.
2) In order to make things consistent with the way other objects (widgets) are managed, may I suggest command formats like ...
neoMenuHideItem "menu2" 1
neoMenuShowItem "menu2" 1
neoMenuDisableItem "menu2" 1
neoMenuEnableItem "menu2" 1
3) This one is debatable, and I will let @luishp make the final decision.
Unlike VisualNEOWin, and in keeping with javascript convention, the item reference numbers (which are references to the array item), start at zero ... might be a bit confusing when the item text in the sample App refer to numbers starting with 1
So, it is debatable whether we should refer to items as 0, 1, 2 etc. or 1, 2, 3