programatically changing Insert/overtype mode

Progress 9.1e02 Windows CHUI

Hi

This may be a silly question but is there a way within a program to ensure that the mode of editing in a field is alway overtype as opposed to Insert.

I.E. On pressing the Insert key on the keyboard then start typing will insert the characters at the cursor. What is needed is, under certain circumstances, to turn off insert mode so that the line is overtyped, then turn on insert mode when the user leaves that line.

Mike
 

joey.jeremiah

ProgressTalk Moderator
Staff member
afaik, progress does not let you toggle "insert-mode" with apply

bulklodd would know more about it then me,

but i dont think you can even use win api's to simulate keys pressed ( keybd_event ) on dos apps
 

bulklodd

Member
afaik, progress does not let you toggle "insert-mode" with apply

bulklodd would know more about it then me,

Really?!

Joey, run the following code and print something in the fill-in (pay attention to the right-bottom corner of the screen)

Code:
DEFINE VARIABLE xxx AS CHARACTER  NO-UNDO.
FORM xxx WITH FRAME f.
ENABLE ALL WITH FRAME f.

ON VALUE-CHANGED OF xxx
DO:
   APPLY "insert" TO xxx.
   RETURN NO-APPLY.
END.
WAIT-FOR GO,END-ERROR OF FRAME f.
QUIT.

i don't know, probably, you didn't notice that but we're talking about CHUI
 

joey.jeremiah

ProgressTalk Moderator
Staff member
Really?!

Joey, run the following code and print something in the fill-in (pay attention to the right-bottom corner of the screen)

Code:
DEFINE VARIABLE xxx AS CHARACTER  NO-UNDO.
FORM xxx WITH FRAME f.
ENABLE ALL WITH FRAME f.

ON VALUE-CHANGED OF xxx
DO:
   APPLY "insert" TO xxx.
   RETURN NO-APPLY.
END.
WAIT-FOR GO,END-ERROR OF FRAME f.
QUIT.

i don't know, probably, you didn't notice that but we're talking about CHUI

my bad. i first tried it with the entry event, so it would only fire once and it
had no effect.

from what i played with its abit of a pain to manage.

firing the trigger only once for each widget to activate the insert-mode isnt
a problem.

but although, in most cases, when you enter a widget the insert-mode is
deactivated.

i found, that in some cases, for example, when using the arrow keys to
move between fields the insert-mode persists.

and applying insert-mode will turn it off instead of turning it on.
 
Top