TsBrowse and down key

Post Reply
mtajkov
Posts: 100
Joined: Sun Mar 08, 2009 4:33 pm

TsBrowse and down key

Post by mtajkov »

Hello All,

I use a Browse with TSBrowse

How to pushing the down key and call a function?

Thanks
User avatar
mmercado
Posts: 782
Joined: Wed Dec 19, 2007 7:50 am
Location: Salamanca, Gto., México

Re: TsBrowse and down key

Post by mmercado »

mtajkov wrote:I use a Browse with TSBrowse
How to pushing the down key and call a function?
Try by using oBrw:bUserKeys codeblock, here you are a working sample:

Code: Select all

#include "Fivewin.ch"
#include "TSBrowse.ch"
Function Main()
 Local oDlg, oBrw
 Use Customer New Shared
 Define Dialog oDlg Size 400, 200 Pixel

 @  0,  0 Browse oBrw Alias "Customer" Of oDlg Size 200, 90 Pixel
 oBrw:LoadFields()
 oBrw:bUserKeys := {|nKey| If( nKey == VK_DOWN, ( MsgInfo( "Can't Go Down" ), 0 ), Nil ) }

 Activate Dialog oDlg Centered
 DbCloseAll()
Return Nil
Best regards.

Manuel Mercado Gómez.
manuelmercado at prodigy dot net dot mx
Post Reply