Move cursor to end of text on entry of fill in

jdpjamesp

ProgressTalk.com Moderator
Staff member
Anyone got any bright ideas? On applying entry to a fill in, we need the cursor to be positioned to the very right of any text already in the fill in, and the fill in value should not be hilighted. That means a user can start typing without overwriting what's there. Any ideas gratefully received.
 
In GUI - don't think it works for character - I find this works:

APPLY "ENTRY" TO vfill-in.
APPLY "END" TO vfill-in.
 
Try this:

ON "ENTRY" of my-fill-in IN FRAME myframe DO:
len_fld = length(my-fill-in).
APPLY "ENTRY" to SELF.
DO i = 1 to len_fld:
APPLY KEYCODE("cursor-right") TO my-fill-in.
end.
return no-apply.
END.
 
Hmmm... if I run the following in character mode it works for me (note that I added "in frame myframe" to the apply keycode which works for me without but may need to be added):

form my-fill-in format "x(8)" with side-labels frame myframe.

display my-fill-in with frame myframe.

ON "ENTRY" of my-fill-in IN FRAME myframe DO:
len_fld = length(my-fill-in).
APPLY "ENTRY" to SELF.
DO i = 1 to len_fld:
APPLY KEYCODE("cursor-right") TO my-fill-in in frame myframe.
end.
return no-apply.
END.

enable my-fill-in with frame myframe.
wait-for go of frame myframe.
 
No problem. Now there is a chui and gui example for others. :-)

For the future, when you post an programming issue, remember to include the Progress version, whether CHUI or GUI, and maybe the OS. That would help to make sure that the answer is appropriate.

Glad to see your problem was solved!
 
Back
Top