FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour TCbrowse disable arrow keys
Posts: 208
Joined: Wed Dec 03, 2008 04:48 PM
TCbrowse disable arrow keys
Posted: Sat Jul 07, 2012 02:37 PM

I think I am too tired...

I have TCbrowse, named oLbx, redefined from RC
I disabled the horizontal scroll slider, it is not visible.

What I need is to disable the user to move left or right the listbox content by using the arrows on keyborad to scroll left or right
I am using this:
oLbx:bKeyDown = { | nKey, nFlags | STOPIRAJ( oLbx, nKey, nFlags ) }
oLbx:bKeyChar = { | nKey, nFlags | STOPIRAJ( oLbx, nKey, nFlags ) }
...
...
and to test:

FUNCTION Stopiraj( oLbx, nKey, nFlags )
do case
case nKey == VK_RIGHT
MsgInfo("right pressed")
case nKey == VK_LEFT
MsgInfo("left pressed")
endcase
? nKey
return nil

Nothing shown. The arrows pressed move the olbx right or left....
Like this function was not even called...

Any help with this?
Thanks

Boris

Posts: 208
Joined: Wed Dec 03, 2008 04:48 PM
Re: TCbrowse disable arrow keys
Posted: Sat Jul 07, 2012 08:01 PM

Disregard.
I found the solution. Just make all columns freeze. I have 15 columns, I use oLbx:nFreeze := 15..
No horizontal scroll possible any more

Continue the discussion