I make sure the node is selected and has focus - all seems to work well


e.g.

procedure TSearchCheckBoxTreeView.WMRButtonDown(
  var message: TWMRButtonDown);
var
        Node: TTreeNode;
begin
        Node := GetNodeAt(message.XPos, message.YPos);
        if Node <> nil then begin
                Node.Focused := True;
                Node.Selected := True;
                inherited;
        end;
end;

-----Original Message-----
From: Mark Derricutt [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 5 August 1999 10:39
To: Multiple recipients of list delphi
Subject: [DUG]: TreeViews and Popup Menus


Problem, I have a TTreeView component and a popup menu attached to it, if
I right click on an item that isn't selected, the tree selects the item,
snapps back to the original item, -then- pops up the menu, when I want it
to popup with the item under the mouse...   I've tried manually calling
the popup menu on the mouse down/up events with no luck, has anyone come
accross this before?

-- 
Mark Derricutt, PB Power NZ Ltd (http://www.pbpower.net)
Getting jiggy with Eternal Decision - Overflow

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

Reply via email to