Tmultiget seems to be frozen in insert mode regardless of user's pressing of the insert key. So I created a workaround that simulates Clipper's oGet:Overstrike() for TMultiget as follows, similar to usage in TGet...
// Insert in methods declarations for TMultiGet of Mget.prg...
// Simulate a Clipper Get system method...
METHOD Overstrike()
//-------------------------------------------
// Insert in METHOD KeyChar() just after declaration of locals...
// Adapted from Tget...
IF nKey >= 32 .and. nKey < 256
if Set( _SET_INSERT )
// Do nothing because Mget is frozen in insert mode.
else
// Use workaround to get same effect as Clipper's Overstrike()
::Overstrike( Chr( nKey ) )
end
ENDIF
//
//-------------------------------------------
// Add this method to bottom of Mget.prg file...
// This is a workaround to enable overstriking though Mget is actually frozen
// in insert mode regardless of the _SET_INSERT setting...
METHOD Overstrike( cChar ) CLASS TMultiGet
LOCAL cOld := "",nLen := 0,cNewMem := "",nPos1 := 1
// Get existing text...
cOld = ::VarGet()
nLen := LEN(cOld)
// Get cursor pos where to insert...
::nPos = nLoWord( ::SendMsg( EM_GETSEL ) )
// Copy text to cNewMem out to position of newly inserted char...
cNewMem := SubStr( cOld, 1, ::nPos )
// Now add remainder of text, omitting the char just after the inserted char...
cNewMem := cNewMem + SubStr(cOld,::nPos+2,nLen)
// Replace multiline get memvar's text...
::VarPut(cNewMem)
nPos1 := ::nPos
// EMW - the text has been changed!
if ::bChange != nil
Eval( ::bChange,,, Self )
endif
// Refresh display of multiline get with new version of text...
::Refresh()
::SetPos(nPos1+1) // Put cursor at beg of next char
RETURN nil
*----------------------------------------------
- Roger