Page 1 of 1

A problem with xBrowse-keyboard navigation ?

PostPosted: Thu May 02, 2019 1:16 pm
by ukoenig
Hello,

I noticed a problem with the xBrowse-keyboard usage
I need the row- and column-position on cell-change using the keyboard
On mouseclick no problem.
The screenshot shows the problem

moving inside the SAME row to the next cell, the column-no. is not updated
Only changing the rowposition after the change it works. ( picture 2 and 3 )

tested with ON CHANGE and
oBrw:bPainted := < |hDC|

Code: Select all  Expand view

@ 5, 30 SAY oSay[1] PROMPT "Row :    " + LTRIM(STR(nRowPos))  SIZE 40, 10 ;
 PIXEL COLOR 0, 12124088 FONT oFont OF oDlg  
@ 5, 90 SAY oSay[2] PROMPT "Column :    " + LTRIM(STR(nColPos))  SIZE 60, 10 ;
 PIXEL COLOR 0, 12124088 FONT oFont OF oDlg  
...
...
// xBrowse :
 ON CHANGE  ( nColPos := oBrw:SelectedCol():nCreationOrder, ;
              nRowPos := oBrw:Keyno(), ;
                       oSay[1]:Refresh(), ; // row-info
                       oSay[2]:Refresh() ) // column-info
 


Image

maybe another possible solution :?:

regards
Uwe :?:

Re: A problem with xBrowse-keyboard navigation ?

PostPosted: Thu May 02, 2019 4:58 pm
by nageswaragunupudi
Your observation is not correct.
The SelectedCol() and nColSel are updated even when the column is changed by arrow keys.

But by default, your bChange is called when row is changed but not when column only is changed.
If you set oBrw:lColChangeNotify := .T. (default .f.), your on change code can see the changes in the selected column also.

Re: A problem with xBrowse-keyboard navigation ?

PostPosted: Thu May 02, 2019 6:03 pm
by ukoenig
Mr. Rao,

If you set oBrw:lColChangeNotify := .T. (default .f.), your on change code
can see the changes in the selected column also.


thank You very much.
That was the missing info. It is working now and returns the selected column-number.

regards
Uwe :D

Re: A problem with xBrowse-keyboard navigation ?

PostPosted: Thu May 02, 2019 6:03 pm
by ukoenig
Mr. Rao,

If you set oBrw:lColChangeNotify := .T. (default .f.), your on change code
can see the changes in the selected column also.


thank You very much.
That was the missing info. It is working now and returns the selected column-number.

regards
Uwe :D