--- 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

<*> 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/
 



Reply via email to