cancel
Showing results for 
Search instead for 
Did you mean: 

Detecting which row the caret is on in a table

Former Member
0 Kudos

I have a GuiTableControl object as seen in my last posting titled Grids.

Im trying to get which table cell has focus, ie where the caret is sitting in the table.

Ive tried checking each GuiTableRow object to see if its 'selected' property is true. This, however, just tells you if the whole row is selected rather than if the caret is present in that row.

Ive tried getting the GuiFrameWindow object for the table and then checking both the 'systemFocus' and 'guiFocus' properties. Unfortunatley, all they return is a higher level object, ie not the actual cell position.

Ive even tried getting the caret position in my calling C++ prog using GetCaretPos, with the hope of using it in findByPosition but it doesnt seem to see the caret in SAP.

Does anybody know of a method to detect which table cell is currently focused on?

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

I mentioned that when getting the guiFocus property that it returned a higher level object. Well, that was because I was looking at the Name property instead of the Id property. Silly me, as the Id property holds the full path for the table cell. Exactly what I want.