09-10-2008 04:17 PM
A table control has a property called editpos. This property returns the cell cordinates for the cell that the use is editing and is writeable. The property correctly returns -1 and -2 values depending if a header is selected or nothing is selected, however, if a -1 or -2 is written to the property it just selects cell 0,0. Is this behavior a bug?
I wanted to input -2,-2 to deselect the current cell that is being edited. Anyone have another idea on how to achieve this?
09-11-2008 05:35 PM
Hi Dillon,
IColumn and Row headings are not a part of the table data. This is from the table help document "The row and column headings of a table are not part of the table data. Table headings are separate pieces of data that you can read and set using Property Nodes."
Can you please clarify this statement? "however, if a -1 or -2 is written to the property it just selects cell 0,0"
Do you mean that when you write -1 or -2, you expect the data in the table header information but get nothing?
09-12-2008 09:58 AM
Thank you for the reply. Actually, I am not interested in the table data. I am only interested in the current edit position within the table control. The table property editpos states
Edit Position Property
Property of Table.
The row-column pair index of the current text entry. Values of (0,0) indicate the top-left text entry. A value of –1 indicates the row or column header. Values of (–2, –2) indicate that no edits are being made to the text of the control. This property does not set text focus on a control that does not already have text focus.
Since the property returns cordinates for selected column headers (-1,x), row headers (x,-1) or no selection (-2,-2). I was surprised if I tried to write a value of -1 or -2 to either the row or colum it would act as if I had typed a 0. For example, (-2,-2) would select cell (0,0) and (-1,4) would select cell (0,4). This behavior seemed like a bug to me or should at least be noted in the property help file.
I did manage to find a solution for my particular problem however. Since I am not trying to move to the header row or column and just wanted to deselect the current edit position I just set KeyFocus to false.