MenuItem has the following 2 functions:
While DesktopMenuItem only has:
So how are we supposed to replace the Remove function ?
There is not even function to get index from MenuItem.
MenuItem has the following 2 functions:
While DesktopMenuItem only has:
So how are we supposed to replace the Remove function ?
There is not even function to get index from MenuItem.
So the only way to port this stupidity to Desktop API is:
Old non Desktop API:
WindowMenu.Remove(mMenuItem)
New Desktop API:
for i as Integer = 0 to WindowMenu.LastRowIndex
if WindowMenu.MenuAt(i) = m_MenuItem then
WindowMenu.RemoveMenuAt(i)
exit for
end if
next
Terrible if you ask me
Can you please share the issue so we can up-vote it.
As far as I see, MenuItem has 4 methods:
Sub Remove(index As Integer) // deprecated for RemoveMenuAt
Sub Remove(item As MenuItem)
Sub Remove(name As String)
Sub RemoveMenuAt(index As Integer)
And DesktopMenuItem has only:
Sub RemoveMenuAt(index As Integer)
So I made case 75887 for this.