LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Listbox Behavioe

Hi Paul,

 


@paul_a_cardinale wrote:

I hate the default behavior for multiple selection.


So it's just your problem… 😄 (Keep the Strg/CTRL key pressed!)

 

And this is the reason your users need to learn special behaviour of your software when they are used to default behaviour of all other software on their computers?

(This is only valid when that software is made just for your own personal use. Otherwise you should create your programs following the "user story"…)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 11 of 14
(201 Views)

@paul_a_cardinale wrote:

I hate the default behavior for multiple selection.  If you inadvertently let up a little bit on the key, all the selections that you've made so far are cleared.


There were cases where I simulated a Ctrl press on mouse enter and a Ctrl release on mouse leave, so that the user can change the selection with a single mouse press.

 

I don't think something like that would work for you, though, since you say you want special behavior for the double click. I would consider making the listbox an indicator (or disable/enable on mouse enter/leave) and then you can handle the mouse down event any way you want instead of having to fight with the existing behavior. You can use the different options already shown or just look at the time of the previous event and if it's less than X it's a double click and you handle it accordingly. I expect you would need to use the timeout event or something else which is async to handle the single click, but it's possible the existing options would be good enough. I haven't looked at the details.


___________________
Try to take over the world!
0 Kudos
Message 12 of 14
(185 Views)

If there are a lot of selections and it becomes a big hassle if you accidently click the wrong way you might consider some established alternative. The first option that could match the user's expectations would be to implement an Undo (Ctrl+Z), but that is not straightforward...

Having two lists where double-clicking or pressing an arrow button will transfer/copy the selected item to the second list with just selected items can work in some scenarios. I normally have arrow buttons to indicate that you can move/copy from one to the other, but then also support move/copy/remove by doouble-clicking or drag and drop to cater for different user preferences.

 

Another option to modify the user behaviour/expectations and reduce the risk of losing selections is to make the listbox have checkboxes, here is a nice implementation of that:

https://forums.ni.com/t5/Community-Documents/Listbox-Multicolumn-Listbox-and-Tree-Item-Selection/ta-...

 

 

0 Kudos
Message 13 of 14
(179 Views)

@paul_a_cardinale wrote:

I hate the default behavior for multiple selection.


Of course it is a well known standard and most experienced users will recognize the mechanism and have it in muscle memory. (e.g. same as when selecting/deselecting multiple files in windows explorer). 😄

0 Kudos
Message 14 of 14
(135 Views)