09-02-2024 06:22 AM
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.
Also, when clicking somewhere else in the tree, the last selection remains visible with a dotted outline, which I don't want either:
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.
09-02-2024 09:23 AM
After you've done whatever processing you need after a value-change, or mouse event, simply set the value to -1.
09-02-2024 10:05 AM - edited 09-02-2024 10:10 AM
@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:
However, there is still the dotted outline and the blue selection occasionally flashes very briefly:
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.
09-02-2024 01:52 PM
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.