forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

%eb cursor positioning

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+
View previous topic :: View next topic  
Author Message
acw



Joined: 04 Nov 2005
Posts: 165
Location: Darkest Devon

PostPosted: Tue Jun 13, 2006 4:12 am    Post subject: %eb cursor positioning Reply with quote

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
View user's profile Send private message Visit poster's website
acw



Joined: 04 Nov 2005
Posts: 165
Location: Darkest Devon

PostPosted: Tue Jun 13, 2006 5:01 am    Post subject: %eb cursor positioning Reply with quote

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
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Wed Jun 14, 2006 2:00 am    Post subject: %eb cursor positioning Reply with quote

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
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+ All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group