Silverfrost Forums

Welcome to our forums

%eb cursor positioning

13 Jun 2006 3:12 #722

Hi,

I have a single-line edit box using %eb (I'm using this in preference to %rs as I can remove the border and colourise the characters). Whenever I click the mouse within the box, the caret moves to the mouse position, rather than the end of the line of text - is there any way I can get it to behave more like a normal single-line edit control ?

Thanks

13 Jun 2006 4:01 #724

A solution that works for a single-line %eb is to add a callback function, set the 'extended' option and handle 'EDIT_REPOSITION' messages - forcing the cursor to the end of the line if the current position is greater than the current buffer size.

Incidentally - EDIT_REPOSITION callback reason does not appear anywhere in the documentation.

Alan

14 Jun 2006 1:00 #726

Alan

I have not been able to find a way to change this behaviour by using the existing %eb features. However, in your callback it might be simpler to call EDIT_MOVE_END@. You will find this function in the help file.

Please login to reply.