View previous topic :: View next topic |
Author |
Message |
acw
Joined: 04 Nov 2005 Posts: 165 Location: Darkest Devon
|
Posted: Tue Jun 13, 2006 4:12 am Post subject: %eb cursor positioning |
|
|
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 |
|
Back to top |
|
|
acw
Joined: 04 Nov 2005 Posts: 165 Location: Darkest Devon
|
Posted: Tue Jun 13, 2006 5:01 am Post subject: %eb cursor positioning |
|
|
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 |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7924 Location: Salford, UK
|
Posted: Wed Jun 14, 2006 2:00 am Post subject: %eb cursor positioning |
|
|
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. |
|
Back to top |
|
|
|