This question is an extension to this one: viewtopic.php?f=66&t=33227
So, I have a document opened in read-only mode - no changes allowed.
Example: bookmarks pane has all the editing commands nicely disabled:
Now, I would like to hide all the disabled commands (from the bar and from the menu).
I'm looking for e.beforeShowContextMenu, iterating over Commands - but all are reported not to be offline?
So, this means they get disabled (set to offline) after this event. When?e_beforeShowContextMenu: menu.bookmarksView
0, ID:cmd.bookmarksView.new cmd.Title: &New Bookmark..., IsOffline : False
2, ID:cmd.paste cmd.Title: &Paste, IsOffline : False
4, ID:cmd.bookmarksView.textSize cmd.Title: Text Si&ze, IsOffline : False
5, ID:cmd.bookmarksView.wrapTitles cmd.Title: &Wrap Long Bookmarks, IsOffline : False
6, ID:cmd.bookmarksView.showIcons cmd.Title: Show/Hide &Icons, IsOffline : False
7, ID:cmd.bookmarksView.useInheritedZoom cmd.Title: &Use Inherited Zoom, IsOffline : False
8, ID:cmd.bookmarksView.autoExpandBookmarks cmd.Title: Automatically Expand Bookmarks, IsOffline : False
10, ID:cmd.document.importBookmarks cmd.Title: Import Bookmarks..., IsOffline : False
11, ID:cmd.document.exportBookmarks cmd.Title: Export All Bookmarks..., IsOffline : False
13, ID:cmd.showPaneInfoBar cmd.Title: Show Info Bar, IsOffline : False
p.s.
I've also tried with custom IEventHandler (Inst.EventServer.RegisterNativeEventHandler) with same results.
-žarko