A problem with xBrowse-keyboard navigation ?

A problem with xBrowse-keyboard navigation ?

Postby ukoenig » Thu May 02, 2019 1:16 pm

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  RUN

@ 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 :?:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: A problem with xBrowse-keyboard navigation ?

Postby nageswaragunupudi » Thu May 02, 2019 4:58 pm

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.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10660
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: A problem with xBrowse-keyboard navigation ?

Postby ukoenig » Thu May 02, 2019 6:03 pm

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
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: A problem with xBrowse-keyboard navigation ?

Postby ukoenig » Thu May 02, 2019 6:03 pm

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
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 63 guests

cron