02-09-2016 10:46 AM
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
03-03-2023 05:17 AM
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
03-05-2023 12:44 AM - edited 03-05-2023 12:45 AM
@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.
04-23-2024 10:50 AM
Using about the same structure I need
Enter or TAB buttons act as mouse click in the new line
04-24-2024 12:57 PM - edited 04-24-2024 12:59 PM
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.
04-25-2024 07:57 AM
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.
04-25-2024 01:19 PM
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.