Press Shift on the column xBrowse

Press Shift on the column xBrowse

Postby Natter » Tue Sep 26, 2017 7:48 am

Hello !

I press Shift on the column xBrowse and process is to a block of code bKeyDown. Is it possible to handle the event releasing Shift ?
Natter
 
Posts: 1224
Joined: Mon May 14, 2007 9:49 am

Re: Press Shift on the column xBrowse

Postby Silvio.Falconi » Tue Sep 26, 2017 11:24 am

you must create a func and insert a codeblock

type this:

oBrw:bKeyDown := {|nKey| MyfunctionTecla(nKey,oBrw,oDlg) }

Function MyfunctionTecla(nKey,oGrid,oDlg)
Do case
case nKey==VK_RETURN
// here your function of modify record
case nKey==VK_INSERT
// here your function of add record
case nKey==VK_DELETE
// here your function of delete record
case nKey==VK_ESCAPE
oDlg:End()
OTHERWISE
IF nKey >= 96 .AND. nKey <= 105
// here your function of search record
ELSEIF HB_ISSTRING(CHR(nKey))
// here your function of search record
ENDIF
EndCase

return nil
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7076
Joined: Thu Oct 18, 2012 7:17 pm

Re: Press Shift on the column xBrowse

Postby Natter » Tue Sep 26, 2017 12:01 pm

I do not understand how using bKeyDown you can handle releasing the previously pressed the Shift key. I tried to use bKeyUp. Did not work
Natter
 
Posts: 1224
Joined: Mon May 14, 2007 9:49 am

Re: Press Shift on the column xBrowse

Postby MGA » Tue Sep 26, 2017 12:38 pm

Natter,

...
CASE ( nKey == VK_F11 )
if GetKeyState( VK_SHIFT )
endif
...
ubiratanmga@gmail.com

FWH24.04
BCC7.3
HARBOUR3.2
xMate
Pelles´C
TDolphin
MGA
 
Posts: 1254
Joined: Mon Feb 25, 2008 2:54 pm
Location: Brasil/PR/Maringá


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 71 guests