LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

[BUG?] Tree control wrong OldVal

Hi,

Well, this seems like a real bug (after the last one, I'm not sure anymore).

Here's the thing...

When multiple items get deselected in a tree (holding ctrl key) at once, the
old value in the event structure returns wrong keys.

The attached VI describes the exact steps to reproduce this (I hope it is
reproducable).

Guess I have to wire a shift register through the entire program...

Regards,

Wiebe.



[Attachment Bug Tree Control.vi, see below]
0 Kudos
Message 1 of 3
(2,759 Views)
There's a bug here, but not in the way you might think. The behavior you are seeing is obviously wrong, but the real bug is that you should not be able to ctrl-click/drag or shift-click/drag in a tree control. The tree control in your VI does not have dragging enabled, so drag operations should be ignored. When dragging is enabled, it is a move operation, not a select/deselect operation (at least not intended - sorry).

I filed a problem report to have this fixed. In the meantime, I believe the workaround you mentioned (using a shift-register) is your best bet. You might want to use a feedback node around the event structure, instead of a shift register, to reduce the wiring (no functional difference, just a bit less obtrusive).

While investigating this I also
discovered that shift-click can fire a value changed event without a value change (i.e. shift-click to select a range, then chift-click the same item again). This is also not correct and has been filed.

Roy
LabVIEW R&D
0 Kudos
Message 2 of 3
(2,759 Views)
Roy,

Well, please don't change this behavior, or make it optional! It is very
convenient to be able to select a large number of tree items at once (just
by dragging+ctrl). I have a tree with a large number of categorized input
names, and by selecting/deselecting them, the user can show them in a chart.
The number of clicks is very low as it is now.

I wasn't convinced about the selecting behavior, I tried to check, but could
indeed not find any tree where items can be selected by dragging+ctrl.
Still, it is very convenient.

Regards,

Wiebe.



"Roy F" wrote in message
news:506500000005000000B9D40100-1079395200000@exchange.ni.com...
> There's a bug here, but not in the way you might think. The behavior
> you are seeing is obviously wrong,
but the real bug is that you should
> not be able to ctrl-click/drag or shift-click/drag in a tree control.
> The tree control in your VI does not have dragging enabled, so drag
> operations should be ignored. When dragging is enabled, it is a move
> operation, not a select/deselect operation (at least not intended -
> sorry).
>
> I filed a problem report to have this fixed. In the meantime, I
> believe the workaround you mentioned (using a shift-register) is your
> best bet. You might want to use a feedback node around the event
> structure, instead of a shift register, to reduce the wiring (no
> functional difference, just a bit less obtrusive).
>
> While investigating this I also discovered that shift-click can fire a
> value changed event without a value change (i.e. shift-click to select
> a range, then chift-click the same item again). This is also not
> correct and has been filed.
>
> Roy
> LabVIEW R&D
0 Kudos
Message 3 of 3
(2,759 Views)