FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Test for Insert Key on
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Test for Insert Key on
Posted: Wed May 02, 2012 09:06 PM
To All

I am using the __Keyboard(chr(VK_INSERT)) command to turn on the insert key, however when I re-issue the same command, it does not toggle the Insert key off.

I am issuing the insert toggle in an xBrowse bOnPreEdit .. which works .. then re-issuing it on the way out of the bOnPostEdit which does not turn Inset off .. I can tell when I navigate into a different cell that the Insert Key is still on.

Here is the code .. any help would be appreciated.

Thanks
Rick Lipkin

Code (fw): Select all Collapse
oLbxB:aCols[5]:bOnPreEdit  := { ||  __Keyboard( Chr( VK_HOME ),__Keyboard( Chr( VK_INSERT)) ) }
oLbxB:aCols[5]:bOnPostEdit := {|o,v| _GetText( v,oLbxB,oRsDetail ),__Keyboard( Chr( VK_INSERT)) }
Posts: 3358
Joined: Fri Oct 07, 2005 08:20 PM
Re: Test for Insert Key on
Posted: Thu May 03, 2012 12:05 AM
Rick:

Did you try:

Code (fw): Select all Collapse
oLbxB:aCols[5]:bOnPreEdit := { | uVar | Set( _SET_INSERT, ! Set( _SET_INSERT ) )}
and
oLbxB:aCols[5]:bOnPostEdit := { | uVar | Set( _SET_INSERT, ! Set( _SET_INSERT ) )}


Regards
SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Re: Test for Insert Key on
Posted: Thu May 03, 2012 01:21 PM
Armando

Thank you !! your code worked .. I left the __Keyboard(chr(VK_INSERT)) in the bOnPreEdit line and added your code to the bOnPostEdit block.

Rick Lipkin

Code (fw): Select all Collapse
// description
oLbxB:aCols[5]:nEditType := EDIT_GET
oLbxB:aCols[5]:bOnPreEdit  := { ||  __Keyboard( Chr( VK_HOME ),__Keyboard( Chr( VK_INSERT)) ) }
oLbxB:aCols[5]:bOnPostEdit := {|o,v| _GetText( v,oLbxB,oRsDetail ) }

...
...

Static Func _GetText( cDesc,oBrw,oRsDetail )

oRsDetail:Fields("Item Description"):Value := cDesc
oRsDetail:Update()

Set( _SET_INSERT, ! Set( _SET_INSERT ) )  // turns off insert from Armando

oBrw:ReFresh()
oBrw:nColSel(6)
oBrw:SetFocus()

Return(NIL)

Continue the discussion