Test for Insert Key on

Test for Insert Key on

Postby Rick Lipkin » Wed May 02, 2012 9: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: Select all  Expand view

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)) }
 
User avatar
Rick Lipkin
 
Posts: 2665
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: Test for Insert Key on

Postby Armando » Thu May 03, 2012 12:05 am

Rick:

Did you try:

Code: Select all  Expand view

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
User avatar
Armando
 
Posts: 3221
Joined: Fri Oct 07, 2005 8:20 pm
Location: Toluca, México

Re: Test for Insert Key on

Postby Rick Lipkin » Thu May 03, 2012 1: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: Select all  Expand view

// 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)






 
User avatar
Rick Lipkin
 
Posts: 2665
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 78 guests