LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Ring Control over Table Cell, but cell-input shows through

Solved!
Go to solution

I took the liberty to mark your posts as a solution. no ones knows better what is a solution than the person that asks the question.

 

Thank you for sharing!

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 11 of 17
(855 Views)

Hi,

If the table is inside a cluster (that contains more tables) how can I get the position of the cell, to use in "mouse up" event?

 

Thanks 

0 Kudos
Message 12 of 17
(250 Views)

@Mal123 wrote:

 

If the table is inside a cluster (that contains more tables) how can I get the position of the cell, to use in "mouse up" event?


In exactly the same way as shown earlier: you register for the mouse up event for the table (the dialog shows you controls inside clusters) and then use the Point to Row Column method and give it the coords from the event. The help for the method doesn't say this, but the point input is in pane coords and the method should compensate for everything.

 

You can either use the CtlRef terminal to select the control to operate on, as shown before, or you can create a linked invoke node by right clicking on the table in the FP.


___________________
Try to take over the world!
0 Kudos
Message 13 of 17
(232 Views)

Using about the same structure I need 

Enter or TAB buttons act as mouse click in the new line

0 Kudos
Message 14 of 17
(92 Views)

Your code seems very convoluted and hard to read. If I understand it correctly, you want the user to be able to click on the table and type in a value and then press Enter or Tab to have a new line added to the table. You could modify your code to do this (you would want the Key Focus property, which can let your string control have focus, and you would need to move the code which adds a line and shows the control to a separate event, so you can enable it both when clicking on the table and when you finish editing the string).

 

Attached is a modification which goes a different way by using only the table. It uses a filter event to convert the Tab press into an Enter, so you can use the value change event for the table. I did it quickly and it might not cover all cases and there might not be a need for the update event, but I haven't checked.

 

Edit: not sure why the file is so large. It seems to be caused by backsaving the VI.


___________________
Try to take over the world!
Message 15 of 17
(68 Views)

Hi,

It is very useful and simple! Thank you and thanks to convert it in LV 2013.

 

I've added the case if one of the rows is deleted, but I am not able to solve an issue.

Then I would like to avoid the first row modification.

 

You can find the two questions in attachment.

 

 

0 Kudos
Message 16 of 17
(53 Views)

I only played with it briefly and I'm not sure I understand your questions, but here is an attempt to answer:

 

 


 if I delete one of the numbers and press enter it copy the last numer. is it possible to avoid to copy the last number?

It seems if you use a value property with the other properties in the property node instead of the local variable this doesn't happen. I don't know why that should make a difference, but I don't really like situations where you and your code are fighting to update the same control anyway, so I would try to consider trying a different UX behavior. That said, I don't know what your exact goal is.

 


2) is it possible to avoid to write in the first row "Mouse click on..."?

If I understand correctly, you don't want the user to be able to overwrite the value there. You could probably use the Mouse Down? event to discard clicks on the first row but it might be possible to work around with keyboard shortcuts (possibly shift-tab, although I haven't checked and you're replacing that with Enter anyway). I would consider just removing that line or making it the caption for the control or a separate decoration.


___________________
Try to take over the world!
0 Kudos
Message 17 of 17
(38 Views)