LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Hide Tree Control Selection

Hi fellow developers,

 

When clicking on a tree control item during runtime, a blue selection displays the currently selected item.

Is there any way to disable/hide that (annoying) selection? I find it a bit ugly and its behavior seems a bit inconsistent, which is frustrating for the user.

I cannot make it an indicator otherwise the cells cannot be edited by the user anymore.

 

raphschru_0-1725270738650.png

 

Also, when clicking somewhere else in the tree, the last selection remains visible with a dotted outline, which I don't want either:

raphschru_1-1725274622020.png

 

The only way I see would be to use the filter event "Mouse Down?" with the discard option and recode the logic for all the clicking interactions (edit cell, right-click menu, double-click, open/close item, ...). I started this way, but this is ridiculously complicated!

 

Also, making the selection transparent does not help...

I hope there is a simpler way...

 

Thanks in advance,

Raphaël.

0 Kudos
Message 1 of 4
(232 Views)

After you've done whatever processing you need after a value-change, or mouse event, simply set the value to -1.

0 Kudos
Message 2 of 4
(206 Views)

@paul_a_cardinale wrote:

After you've done whatever processing you need after a value-change, or mouse event, simply set the value to -1.


I guess you meant set the tree value to an empty string?

 

I managed to reduce the appearance of the blue selection by setting the tree value to an empty string at "value change" of my tree.

Note : I am also using the "Mouse Down?" event to allow the user to edit the cells more rapidly by controlling the edit position:

 

raphschru_1-1725288798762.png

 

However, there is still the dotted outline and the blue selection occasionally flashes very briefly:

 

Hide Tree Control Selection.gif

 

Adding another reset of the tree value in the "Mouse Down?" or "Mouse Down" event handlers has no additional effect.

I had also tried playing with "Defer Panel Updates" without success.

 

Regards,

Raphaël. 

0 Kudos
Message 3 of 4
(194 Views)

You can eliminate the blue flashes by changing the selection color to white.

You can somewhat reduce the dotted frame by removing key focus on a Mouse-leave event.

paul_a_cardinale_0-1725303004617.png

 

Message 4 of 4
(166 Views)