LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Disable table edit

HI ,

Would like to know if there is any way to disable editing the table contents .

I tried to disable the table which does not allow me scroll .

I would just need to disable editing and retain the scroll properties.

 

Sundar.

0 Kudos
Message 1 of 13
(5,582 Views)
Change it to an indicator instead of a control.
0 Kudos
Message 2 of 13
(5,580 Views)

I have a similar problem, but I want to allow the user to set values inside the table at the start of the program. When they hit a start button I want to lock the table from being edited, but still allow scrolling.

 

So far I've just been disabling the table but this also disables scrolling.

0 Kudos
Message 3 of 13
(4,804 Views)

I don't know how you're currently set up, but you can have a boolean in a shift register along with a 'Key Down?' filter event, and wire the boolean shift register to the 'Discard?' output.

 

A simple example is attached. Does this work for you?


GCentral
0 Kudos
Message 4 of 13
(4,796 Views)

A kind of hacky way to do it would be to put a transparent decoration over the table portion of the table.  When you want someone to be able to edit it, then make the decoration (by using a reference to it) invisible.  When you want editing to be locked, make the decoration visible.

0 Kudos
Message 5 of 13
(4,791 Views)

Make the table an indicator, but duplicate the table as control into a subVI and pop that subVI as a dialog when a mouse-down occurs on the table. Make sure the table gets populated with the current values on each call. Once you no longer allow editing, simply no longer pop the subVI.

0 Kudos
Message 6 of 13
(4,786 Views)

Also have a look at the discussions of this old idea.

0 Kudos
Message 7 of 13
(4,782 Views)

cbutcher a écrit :

I don't know how you're currently set up, but you can have a boolean in a shift register along with a 'Key Down?' filter event, and wire the boolean shift register to the 'Discard?' output.

 

A simple example is attached. Does this work for you?


A user will still be able to copy/paste data into the table even if the Key Down event is discarded. A "classic" indirect way to do this is to put a transparent decoration on top of the table (but not covering up the scrollbar) and to use the decoration visible property to lock/unlock the table.

 

edit: seems like a took a very long time writing this reply 🙂

 

Ben64

0 Kudos
Message 8 of 13
(4,778 Views)

@ben64 wrote:

cbutcher a écrit :

you can have a boolean in a shift register along with a 'Key Down?' filter event, and wire the boolean shift register to the 'Discard?' output.

 


A user will still be able to copy/paste data into the table even if the Key Down event is discarded.


Thanks for the heads up!


GCentral
0 Kudos
Message 9 of 13
(4,769 Views)

Thanks for the advice.  Referring to the old idea discussion, I'm surprised nobody suggested a "disable data entry" property node.  I understand their hesitation to make a "enable scrolling while control is disabled" node, but disabling data entry while allowing scrolling seems like a basic feature.


In the meantime I suppose I'll just add a transparent decoration above the table control.

0 Kudos
Message 10 of 13
(4,756 Views)