10-29-2018 01:03 PM
I have a problem with Table control. All what I need:
Select one cell in the table (no multiple selection, no zero selection, no editing).
Selection can be limited catching "mouse up" event then reducing selection size. This is probably inventing a wheel but I cannot find anything better. It is Monday after all
But the main problem is unkillable EditPosition. This is simple test VI. Despite setting EditPos to (-2,-2), the result is always (0,0). And the position is indicated in Front Panel (but cannot be edited). What is my mistake?
Thank you
Solved! Go to Solution.
10-29-2018 03:03 PM
Look at the help file. No where does it say that -2 is a valid entry. It will only return -2 if no edit is being made.
Edit Position Property
Name | Description |
---|---|
Row | The row of the current text entry. Possible values are 0…n, where n is the total number of rows - 1. |
Column | The column of the current text entry. Possible values are 0…m, where m is the total number of columns - 1. Enter –1 to select the column header. |
10-30-2018 12:00 AM - edited 10-30-2018 12:03 AM
Thank you aputman for reply. It does not solve the problem but shows my mistake.
I have found solution for my problem
Select one cell in a Table (no multiple selection, no zero selection, no editing).
It works for both Table control and Table indicator. Not so obvious or elegant but it works:
11-09-2022 04:45 PM - edited 11-09-2022 05:05 PM
Hi _Y_, your solution doesn't quite work for me because I need the table to be scrollable which is disabled when the control is disabled. However, it led me to a solution to capturing the cell clicked without invoking an edit. Through testing I noticed that the cell edit is activated on Mouse Down. So, I created an Event Case via Mouse Down? to handle and discard the Mouse Down event. This kept the Table Control from activating the edit on the cell clicked. Like you, I then used the Mouse Up event to perform my operations on the cell and the information contained within it. Thanks for the breadcrumbs!
-