How to change the key's default behaviour in a MULTIPLE browse

anne

New Member
I would like to change the key's default behaviour in a MULTIPLE browse
I would like that keys unselect previously selected rows and select the new row where i put foccus, and i would like to keep multiple selection only with mouse.

I thought i could code this like that :
DEFINE QUERY q1 FOR Customer SCROLLING.
DEFINE BROWSE b1 QUERY q1 NO-LOCK
DISPLAY
Customer.CustNum Customer.Name Customer.Phone
WITH MULTIPLE 15 DOWN NO-ASSIGN SEPARATORS.​

DEFINE FRAME f1
SKIP(1) SPACE(8) b1 SKIP(1) SPACE(8) ​
WITH NO-BOX.

ON "CURSOR-DOWN" OF BROWSE b1 ​
OR "CURSOR-UP" OF BROWSE b1
OR "PAGE-DOWN" OF BROWSE b1
OR "PAGE-UP" OF BROWSE b1
OR "HOME" OF BROWSE b1
OR "END" OF BROWSE b1 DO:
BROWSE b1: DESELECT-ROWS ().
BROWSE b1:SELECT-FOCUSED-ROW().​
END.


OPEN QUERY q1 FOR EACH Customer. ​

ENABLE ALL WITH FRAME f1. ​

WAIT-FOR WINDOW-CLOSE OF CURRENT-WINDOW.​

But method "SELECT-FOCUSED-ROW()." select the row where i was (before the key is apply) and not where i go:
​

Is there anyone who can suggest something ?​
 
i worked on this code i found that when we write the vice versa that is
ON "CURSOR-DOWN" OF BROWSE b1 ​
OR "CURSOR-UP" OF BROWSE b1
OR "PAGE-DOWN" OF BROWSE b1
OR "PAGE-UP" OF BROWSE b1
OR "HOME" OF BROWSE b1
OR "END" OF BROWSE b1 DO:
BROWSE b1:SELECT-FOCUSED-ROW().
BROWSE b1: DESELECT-ROWS ().
END.
IT deselects all the rows which u had selected prior and also the current row.While accordint to your code it was deslecting only the previous row not the current row. Is this what you were looking for.

​
 
Thank's for your answer, but it's not what i am looking for.
I would like the current row to be selected when i use keyboard to move.
And i would like to keep the behaviour of multiple selection with the mouse.
 
Back
Top