TCbrowse disable arrow keys

TCbrowse disable arrow keys

Postby codemaker » Sat Jul 07, 2012 2: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
User avatar
codemaker
 
Posts: 208
Joined: Wed Dec 03, 2008 4:48 pm
Location: Belgrade, Serbia

Re: TCbrowse disable arrow keys

Postby codemaker » Sat Jul 07, 2012 8: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
User avatar
codemaker
 
Posts: 208
Joined: Wed Dec 03, 2008 4:48 pm
Location: Belgrade, Serbia


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 24 guests