Page 1 of 1

VL Web - Current Character position in a PRIM_TEXT

Posted: Sat Jun 24, 2017 1:41 am
by MarcusLancaster
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.

Marcus.

Re: VL Web - Current Character position in a PRIM_TEXT

Posted: Mon Jun 26, 2017 12:24 pm
by Stewart Marshall
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

Regards