SPONSORS:






User Tag List

Results 1 to 2 of 2
  1. #1
    Junior Member
    Join Date
    Nov 2000
    Location
    Melbourne, VIC, Australia
    Posts
    1
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    PopupSelect problems

    Hi,
    The people on this forum seem to be pretty helpful, so I thought Id give it a shot!

    I am trying to right click on a tree in a MMC snapin and select something from the popup menu.

    The method I am currently using to do this is:

    [ ] RECT rSel = Window.AfxFrameOrView42u1.TheTree.GetItemRect("/some/path")
    [ ] Agent.SetOption (OPT_MENU_INVOKE_POPUP, "<Button2><Up><Down>")
    [ ] Window.AfxFrameOrView42u1.TheTree.PopupSelect(rSel .xPos+4, rSel.yPos+4, "Popupmenu Item")


    I alway get the error message:
    *** Error: Window 'Popupmenu Item' was not found

    Has any one else had success with this method, or know what I am doing wrong?

    [This message has been edited by eytan (edited 11-09-2000).]
    -------
    Eytan Lenko

  2. #2
    Junior Member
    Join Date
    Apr 2001
    Location
    North Reading, Massachusetts USA
    Posts
    5
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: PopupSelect problems

    i had this same problem. i had to write a custom PopupInvoke at the level of the Tree, passing in the x,y coordinates of the selected TreeView item. Once i had gotten the popup menu up i used the Pick() method on the MenuItem. Here is the code snippet for the PopupInvoke:

    [-] PopupInvoke (INTEGER x, INTEGER y)

    [ ] Menu
    ("{WindowTag(this)}/({x},{y})/$PopupMenu").GetContents ()

    Hope this helps.

    ------------------

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 07:27 PM.

Copyright BetaSoft Inc.