LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I mark multiple selections in a tree using <Shift> Click

Solved!
Go to solution

I feel like I'm missing something obvious here, but I've searched around quite a bit without a solution.

 

I have a tree with check boxes (ATTR_SHOW_MARKS is enabled). I am able to Select multiple items in the list (ATTR_SELECTION_MODE is VAL_SELECTION_MULTIPLE). <Shift> click works to select multiple, but my issue is, when using <Shift> click it only marks (as in checks the boxes) on the first and last items. The others are selected but not checked.

 

Is there an option I'm missing here or do I need to write the code to mark them manually? If I need to write the code, is the easiest way to check the KEYPRESS status when EVENT_SELECTION_CHANGE occurs?

 

Thanks in advance,

 

Chris

0 Kudos
Message 1 of 3
(3,851 Views)
Solution
Accepted by chris_oceansonics

You can try setting ATTR_DRAGGABLE_MARKS and see if that suits your needs. 

 

If you really want to set the mark state using <shift-click>, then yes, you'll have to write the code to do that. You can use GetGlobalMouseState to get whether the shift key is down.

Message 2 of 3
(3,827 Views)

Thanks for your answer. I've looked at draggable marks, and will probably use that too, but shift click is also important.

 

I will have to code that myself. At least now I know I wasn't just missing something obvious.

0 Kudos
Message 3 of 3
(3,808 Views)