LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Possible bug disabled & grayed Listbox?

Solved!
Go to solution

Hi all,

 

I have 2 listboxes one enabled and one disabled & grayed. When I drag an item (from the enabled one) I can drop it in the disabled & grayed!

Is this normal behavior??

Work around: when  disable & grayed the lisbox pragmatically, also set the allow dropping off.

0 Kudos
Message 1 of 16
(3,245 Views)

A LabVIEW pureist would say that the control is disabled because the value of the control cannot be changed and because you aren't changing the value when you drag and drop it is okay.

 

But the user in me thinks you would be right.  When I disable the control I wouldn't want to be able to drag and drop to it.

0 Kudos
Message 2 of 16
(3,218 Views)

Hi Hooovahh,

 

Thanks for your reply, 

When you drag and drop in to the control its value is actually changing. 

 

 

0 Kudos
Message 3 of 16
(3,215 Views)

You are right sorry I didn't expect the event "Value Change" to be generated but it is.  My vote is bug.

0 Kudos
Message 4 of 16
(3,211 Views)

This is kind of a grayed area...

 

The 'value' of the listbox is not changing.  The selection is the value, not the list of items.  I have to side on not a bug, BUT at the same time I have to agree that it is not expected behavior.  I think the default behavior should be that disabling a listbox also disables dropping, but it should be possible to turn it on if so desired.  Instead of almost always wanting to disable dropping at the same time you disable a control, it should be that the few times you want a disabled control which allows dropping that you have to set it explicitly.  Make sense?

0 Kudos
Message 5 of 16
(3,203 Views)

The value is changing, test it yourself

0 Kudos
Message 6 of 16
(3,197 Views)

Ha, you are right.  I had a brain cramp and tested it using a VI where I overrode the default behavior.  You are right a control left to its own devices accepts the drop and changes the value to the new selction.

 

B-U-G

0 Kudos
Message 7 of 16
(3,192 Views)

Hello,

 

I just tested it at my side with an empty install of LabVIEW 2012.

 

My hunch feeling says that it should not be possible to do that if the control is disabled, but..

 

If I tested it at my own side from scratch, then something popped up:

The default Modern Listboxes have by default dragging and dropping (inside the listbox) disabled. (i forgot that because I noramlly use a customized version)
So you explicitely have to enable dropping, before you can see this behavior and might be that some people would want to have behavior like this.

 

Imagine someone that would like to drop into a listbox, that you cannot drag something out anymore (without other "actions"). (I'm thinking about to do lists etc..)

For this you could use a disabled listbox.

 

I fully agree that it might be weird behavior, but you have to explicitely set that property to enable the dropping.

 

If you want me to, then I could file it as a Corrective Action Request.

However, I don't know if it will get "accepted".

 

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
0 Kudos
Message 8 of 16
(3,173 Views)

Hi ThiCop,

 

Thanks for the reply.

 

There can be several ways to look at it, but Disabled is Disabled

0 Kudos
Message 9 of 16
(3,171 Views)

Hello Franzo,

 

From the "User Side" I fully agree with you, but from a programmer's side there's something holding me back.

That's why I also said I agreed with it by following my hunch feeling.

 

Can you explain me how you're using the drag and drop feature and in which situation you want to disable/enable it?

Having an idea about the use case will help me create a "convincing" Corrective Action Request.

 

How would you see the "perfect situation" for this control?

Would you like to remember the control's original state (with regards to dragging and dropping) when you disable it (and afterwards re-enable it)?

Should it use the original drag and drop settings when re-enabled afterd disabling?

 

I'm just asking this, because this will allow me to fully follow the way you want it to behave.
And in this case (bugs or CARs) more documentation and use cases are always better.

 

Also a good idea would also be to post your idea on the NI Idea Exchange pages:

ni.com/ideas

 

This could make the idea very popular and likely to be implemented in the next versions of LabVIEW.

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
0 Kudos
Message 10 of 16
(3,161 Views)