Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

Right-click options

I am trying to make a set of right-click options based on the position when the user right-clicks.
When you left click you can get the selpos and key.
When you right click it returns a mouse pointer, and the current selected key, not the one you right-clicked on.
Is there any way to pick up a key from the mouse point position, or some other way via right-click to get this.

Without this, the user has to click to highlight, then right-click to get the options.
I am trying to avoid the extra click.



  • I cannot recreate this. I even put a debug inside the C++ code and verified that I am sending the key of the "hot" item. The only thing that might be messing with this is that I did have a condition that if an item was set as non-selectable, then the event would pass "". I think that was an error and the next release won't be doing that. However, I could not immediately see why a right click would be sending only the selected item.

    Does what I mention above have any possible bearing? If not, I will need something I can use to replicate.
  • Thanks Kevin.

    All items are selectable, so I don't think that is related.
    I have tried a few more things, which might help.

    When I right-click the first time it returns the correct key as per the right-click position.
    If I just do another right-click immediately on another position, it returns the same key, not the key for the new position.
    If I click elsewhere on the form to lose focus and regain focus on the right-click, it then returns the correct key again.
    This might explain why if you debug it works, as you are losing focus and regaining focus.
    Even clicking on the vertical scroll bar handle on the same control, and then right-click again works.
    Its only if you keep repeating the right click.

    So, it is just when you right-click several times in a row, and don't select any of the right-click options that appear.

    Not sure if this part of the same thing or it is meant to be, but the focus item also gets out of synch sometimes.

    I can get this by:

    1 click on an item
    2 right-click on another item
    3 right-click on another item
    4 click on another item, the item as per click 1 has the dotted line, but click 4 is the selected one.

    This is not an issue for me, just mentioning in case you see the behaviour and feel it is not right.

  • Something unique about your tree setup is at play here as I still can't recreate this. I've clicked every which way I can think of, including the steps you outlined, to no avail. If you are feeling charitable, an RDK demonstrating this would help immensely (or just the setup code as long as it doesn't require data).
Sign In or Register to comment.