With JS
this.getField("FieldName").value = "test value"
i can set the value of a form field.
How can i get the cursor position of the field, to insert a text at the positopn of the cursor?
So, the vield Value is "test text"
the cursor is placed at the begin of the second word ("text")
i would like to insert the text "insert" at the cursor position.
the result should be "test insert text"
thanks
Peter
Insert value at cursor position in form field
Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan
- Tracker Supp-Stefan
- Site Admin
- Posts: 17907
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact:
Re: Insert value at cursor position in form field
Hi Peter,
You can obtain the mouse coordinates directly through the Vewer AX SDK:
https://help.pdf-xchange.com/DEV/de ... ions_mouse
However determining where exactly that is relative to the text inside a form field might be harder.
Regards,
Stefan
You can obtain the mouse coordinates directly through the Vewer AX SDK:
https://help.pdf-xchange.com/DEV/de ... ions_mouse
However determining where exactly that is relative to the text inside a form field might be harder.
Regards,
Stefan
Re: Insert value at cursor position in form field
Hi Stefan,
Thank you for your answer.
Sorry, my description was not exactly.
I didn’t mean the mouse cursor, I mean the editor (text) cursor when the form field is selected.
Like in the screenshot (attached zip), you see the cursor between the two words (insert text).
I want to insert a text programmatically at the cursor position (between the two words)
Thanks
Peter
Thank you for your answer.
Sorry, my description was not exactly.
I didn’t mean the mouse cursor, I mean the editor (text) cursor when the form field is selected.
Like in the screenshot (attached zip), you see the cursor between the two words (insert text).
I want to insert a text programmatically at the cursor position (between the two words)
Thanks
Peter
- Attachments
-
- insert test.zip
- screen shot
- (11.43 KiB) Downloaded 112 times
- Tracker Supp-Stefan
- Site Admin
- Posts: 17907
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact:
Re: Insert value at cursor position in form field
Hi Peter,
I don't think you can obtain that particular information.
You can however obtain the current field value, and then update it to the new one that will include your word in the middle as well.
Regards,
Stefan
I don't think you can obtain that particular information.
You can however obtain the current field value, and then update it to the new one that will include your word in the middle as well.
Regards,
Stefan
Re: Insert value at cursor position in form field
Hi Stefan,
What a pity that i can't get this information, but thank you for your efforts.
Regards
Peter
What a pity that i can't get this information, but thank you for your efforts.
Regards
Peter
- Tracker Supp-Stefan
- Site Admin
- Posts: 17907
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact:
Re: Insert value at cursor position in form field
Glad I could assist Peter!
Regards,
Stefan
Regards,
Stefan