disable CTRL click selection/deselection in trees

Grids for WPF Forum

Posted 3 years ago by Andrew Levine
Version: 19.1.0684
Avatar

I'm linking the nodes in a tree listbox to positions in a text editor, so when a user selects one or more sibling nodes in the tree, the corresponding range is selected in the text. So when a user deselects an item in the middle of the tree selection by pressing CTRL and clicking already-selected tree items, it results in a logic error since that would mean splitting the text editor selection in two. Is there any way to keep the MultiSelect extended and kind=sibling, and disable the CTRL-click?

Comments (1)

Answer - Posted 3 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Andrew,

I'm sorry but there isn't an option to prevent Ctrl+Clicks if SelectionMode.Extended is used.  You might have to watch for selection changes yourself and if you detect that scenario, programmatically alter the selection again.

Alternatively, if you are using SyntaxEditor for your text editor, it supports multiple disjointed selection ranges.


Actipro Software Support

The latest build of this product (v24.1.2) was released 1 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.