Yip,

I think I found one already...

It is to do with the OnContextPopup event which has been newly introduced...

In our app we used to look for right clicks and Shift-F10 keyboard
combinations to popup context menus for List view items much like
explorer... We didn't respond to the new keyboard key yet, so I thought, Ok,
not much code changing required to get it to work with all forms of Context
Menu generation (as explained in the help file)... Great!

The help file says:

>type TContextPopupEvent = procedure(Sender: TObject; MousePos: TPoint, var
Handled: Boolean) of object;
>
>Description
>
>Sender is the control for which the user requested a popup menu.
>
>MousePos indicates the position of the mouse, in client coordinates, when
the user clicked the right mouse button. If the user did not use a right
click to invoke the popup (for example, if the event occurs in response to
keyboard input), MousePos is (-1,-1).

In particular, the problem is with the MousePos = (-1, -1) bit... it is not
True, so it makes it hard to determine when you are responding to keyboard
input and when you are responding to Mouse input (important when you are
trying to identify which item the user wants the context menu to pop up
for).

Also in testing this, I used a ShowMessage(ListItem.Caption) to show which
item the context menu was for... This also had another strange behaviour in
that hitting Enter to close the MessageBox didn't... It brought up the
Move/Close menu for the Message Box!!

Sorry to bore you with the details, just thought some might be interested...
and as the new Context Menu stuff stops my old code from working I shall
have to find a new way of doing things... Sigh...

Regards

Colin Fraser
Hill Laboratories
Hamilton
New Zealand

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to