Hello Community

Hello Community,

I am a little bit stuck with my VirtualExplorerTree (Mustangpeak).

Situation:
I have an ExplorerTree and a custom right click popup menu assigned to the tree. Path A is selected and I want to right click on Path B to initiate a popup action based on the righ-clicked directory.

Problem:
When right-clicking my ExplorerTree, the "SelectedPath" in ExplorerTreeMouseDown or ExplorerTreeChange is Path B (as expected). 
But when I click my appropriate menu item (or escape to cancel the menu), another ExplorerTreeChange event is fired where the SelectedPath is Path A again although I did not set it explicitly.

Observed Behavior in short:
After right-clicking Path B (which is visually selected at that point) and clicking a popup menu item, the ExplorerTree jumps back to Path A again.

Is this expected behavior? (not for me)
How can I avoid the "jump back" without implementing private fields to work around that issue by hand?

Comments

  1. Erik Virtel I'm not aware of any such interference, sorry. (If there is one, it's IMHO a bug.) In my experience, toRightClickSelect has the effect as described above.

    ReplyDelete
  2. Can I change the SelectedPath for example in MouseDown? BrowseTo does not work for that purpose.

    ReplyDelete
  3. Finally my co-worker found the solution. Besides TreeOptions.SelectionOptions toRoghtClickSelect, the VirtualExplorerTree additionally exposes TreeOptions.VETMiscOptions toRightButtonSelect, which needs to be checked.

    ReplyDelete

Post a Comment