FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour TsBrowse and down key
Posts: 130
Joined: Sun Mar 08, 2009 04:33 PM
TsBrowse and down key
Posted: Tue Jun 22, 2010 06:58 AM

Hello All,

I use a Browse with TSBrowse

How to pushing the down key and call a function?

Thanks

Best regards

Milos



[ FWH 21.11 ] [ xHarbour 1.2.3 Intl. (SimpLex) (Build 20150603) ]
Posts: 782
Joined: Wed Dec 19, 2007 07:50 AM
Re: TsBrowse and down key
Posted: Wed Jun 23, 2010 12:19 AM
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 (fw): Select all Collapse
#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

Continue the discussion