disable CTRL click selection/deselection in trees

Grids for WPF Forum

The latest build of this product (v2020.1.1) was released 2 months ago, which was before this thread was created.
Posted 2 days 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 2 days 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

Add Comment

Please log in to a validated account to post comments.