VL Web - Current Character position in a PRIM_TEXT

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
User avatar
Posts: 28
Joined: Tue Nov 24, 2015 9:20 pm

VL Web - Current Character position in a PRIM_TEXT

Post by MarcusLancaster » Sat Jun 24, 2017 1:41 am

Hi all.

In a VL Web application I've created a free format multi-line edit box (using a PRIM_TEXT), where in addition to random typing the user can right click, launch a pop up menu which has some preset text options that (when selected) will be inserted into the edit box. That all works - but at the moment my only option is to append the preset text to the end (or the beginning) of the text box because I don't know the current character position in the control.

In windows VL applications I've previously used #PRIM_MEMO's and recall I had access to the CharacterPosition property which (with a bit of substringing) let me insert new text into the middle of the memo box based on the character position in the control.

So... I wonder if there a way for me to replicate this functionality in a PRIM_TEXT? I can't see anything obvious, hence this post.

I did try another approach using a #PRIM_EDIT, but although that gives me access to "selection start" and "selection end" it doesn't appear to give me the character position when I'm not selecting, and a PRIM_EDIT doesn't give word wrap... which ideally I need.

So I just wondered if anybody had encountered this situation in VL Web and had a neat solution.

Cheers for now.


User avatar
Stewart Marshall
Posts: 417
Joined: Thu Nov 05, 2015 5:25 pm

Re: VL Web - Current Character position in a PRIM_TEXT

Post by Stewart Marshall » Mon Jun 26, 2017 12:24 pm

Hi Marcus

There's nothing currently available in Prim_text to allow you to determine cursor position.

It would be a valuable addition, as would Cut/Copy/Paste functionality.

Please request an enhancement

Stewart Marshall

Independent IT Consultant

Post Reply