Well, i remember i tried to use OnChanging method, but it dind't work. I could mak it working by using OnContextPopup, to change Popup.
Thank your for help. PS : about to populate the Menu on OnPopup event, my problem was to understand on which TreeItem was pressed the mouse, and at the moment i [it seems] just could do that by using OnContextPopup. ----- Original Message ----- From: "mikcaau" <[EMAIL PROTECTED]> To: <[email protected]> Sent: Thursday, April 14, 2005 1:29 AM Subject: [delphi-en] Re: Delay popup > > > --- In [email protected], "Mauro Russo" <[EMAIL PROTECTED]> wrote: > > Dear people, > > > > i'd like to popup the popupmenu AFTER having > > OnMouseDown event. > > I have this problem on a TTreeView, becuase i want to set differents > > popup-menu(s) according to the TreeNode selected. > > I know i can use AutoPopup=false and to call Popup(X,Y) by myself, > > but i'd like to don't have to solve the problem to set X,Y to show > the popup inside the screen. > > > > Thanks for help. > > > > [Non-text portions of this message have been removed] > Why go to all that trouble (ClientToScreen stuff)? > Instead use Menu's OnPopUp event to populate it (ie remove menuitems > you don't want (Action.Visible := false) and Show MenuItems you do > want (Action.Visible := true). > > A more general way to handle this would be to use TTreeView.OnChanging > event, set action visibility there and if you have short cut keys or > buttons then they will be set too. > > Mick > > > > > > ----------------------------------------------------- > Home page: http://groups.yahoo.com/group/delphi-en/ > To unsubscribe: [EMAIL PROTECTED] > Yahoo! Groups Links > > > > > > > > ----------------------------------------------------- Home page: http://groups.yahoo.com/group/delphi-en/ To unsubscribe: [EMAIL PROTECTED] Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/delphi-en/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

