Quantcast
Channel: SCN : All Content - PowerBuilder Developer Center
Viewing all articles
Browse latest Browse all 2935

SelectText ( start, length ) different behavior on 'edit' and 'richtext' columns

$
0
0

Hi,

when I use this function on columns with edit.style = 'edit' the result is another then on columns with edit.style = 'richtext'.

Example:

edit.style = 'edit'

selectText ( 5, 4 ) => selects the characters 5 to 9, the position of the cursor is behind the selected text

selectText ( 5, -4 ) => selects the characters 5 to 1, the position of the cursor is at the beginning of the selection

 

edit.style = 'richtext'

selectText ( 5, 4 ) => selects the characters 5 to 9 (same as 'edit'), the position of the cursor is at the beginning of the selection (different than 'edit')

selectText ( 5, -4 ) => selects only the first character ahead the startposition,in this example the 4. character. It isn't working with negativ values for 'richtext', except you want to select one character.

 

As workaround, to get the same behavior for both edit.styles, i have to differ between the edit.styles, i use backward selecting vor edit ( selectText(5,-4)) and forward for 'richtext' (selectText(1,4)).

 

There is no description of different behavior between edit.styles 'edit' and 'richtext'. I only found an other function for RTF datawindows and not for richtext columns in other datawindows such as FreeForm.

 

Is the different behavior a bug?

 

Regards

Gerrit


Viewing all articles
Browse latest Browse all 2935

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>