> Currently I am trying to get a context menu working for a particular
> view I have created, so in my menus.odc file I have the lines :
> MENU "*" ("G1MyView.View")
> "Add" "A" "StdCmds.OpenAuxDialog('G1/rsrc/impopen','cool')" ""
>
> END
>
> But when right mouse clicking on my view, the menu doesnt appear.
> Any suggestions as to why this is the case
Windows rules specify, that a context menu appears when the right mouse is
clicked. However, if you click the right mouse in a selection and move around
with the mouse, then a Drag&Drop operation is performed. Therefore BlackBox
can only implement this mechanism in those views, which have an abstraction
for selection, i.e. in container views. Since your simple view is not a
container, the context menu does not appear.
However, if you would like to see a context menu, you can add the following
line to your code which handles the Controllers.TrackMsg:
IF HostPorts.right IN msg.modifiers THEN HostMenus.PopupMenu END;
Note however, your code will become non-portable, as it depends on Host
modules.
Additionally, you have to answer the Controllers.PollOpsMsg.
Hope this helps,
- Dominik Gruntz
====================================================================
Dr. Dominik Gruntz Oberon microsystems, Inc.
gruntz{([at]})nowhere.xy
voice ++41-1-445-1751 CH-8005 Zurich
fax ++41-1-445-1752
http://www.oberon.ch
====================================================================
Received on Mon Apr 06 1998 - 16:57:40 UTC