cancel
Showing results for 
Search instead for 
Did you mean: 

Current position of Cursor in TextEdit Element

Former Member
0 Kudos

Hi

I would like to know how can i determine the current position of the cursor in general.

I would also like to know the current position of the cursor in textedit element.

Regards

Piyush

Accepted Solutions (0)

Answers (1)

Answers (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

There is no functionality in Web Dynpro to give you the cursor position within the TextEdit UI element.

Former Member
0 Kudos

thank you.

Is there any functionality to find the current position of the cursor in the view. For example, which element the cursor is presently.

Regards

Piyush

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

I didn't see anything in the APIs to allow you to get the cursor position either. There are methods to set the focus however. What exactly are you trying to acomplish from a functionality standpoint.

Former Member
0 Kudos

i want to identify the element at which the cursor is presently focus. there is a helper button which adds a text when the button is pressed.

Now if the cursor is on Element A, then i need to add text in that element.

If the cursor ins on Element B, i need to add text in B element.

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

You should use the explanation property instead. That is exactly what it was designed for.

Former Member
0 Kudos

Do u mean by the explanation Element???

How do i achieve my requirement using it?

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Actually I was refering to the Explanation property not the UI element. This is a description that appears when a UI element gets the focus for a few seconds. It is designed to allow for the kind of onFocus help text that you said you wanted.

http://help.sap.com/saphelp_nw70/helpdata/EN/45/11e345459d7201e10000000a155369/frameset.htm

Former Member
0 Kudos

I checked the property, but it does not fulfill my requirement.

What i want is:

There is a view with several textedit/input elements, say A,B,C....n

There is a Helper Function Button, But.

Now when the user clicks on the button, i need to add a text, 'HELLO' in the element where the cursor is currently positioned.

So in other words, the focused element will be appended by text 'HELLO'...

So if i can find out the focused element, then i can append the text.

Now my question is how do i find out the focused element in the view.

Regards

Piyush

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

What you described is not possible in Web Dynpro.