Please try following with code below:
1. Start the app
2. In colomn 1, you see rows with 111,222 and 333
3. In the browse, click with the mouse on row 2
4. Than, click with the mouse on row 3 in the browse
5. Now notice that column 1 of row 2 changed to 111
This is because I have the oGet:SetFocus() in the bLine of the browse.
Let me explain what I want to do:
If the user selects a row with his mouse, I want the GET to display the value of Column1 in the selected row AND set focus on the GET. This is important, because it is the SETFOCUS() that makes the value change in the browse.
Is this a bug or do I need to do it in a different way?
Thanks!!
Patrick
- Code: Select all Expand view RUN
PROCEDURE Main()
LOCAL oDlg, oBrw, n:=1, oGet
LOCAL aData:={111,222,333}
DEFINE DIALOG oDlg FROM 0,0 TO 25, 80
@ 0,0 LISTBOX oBrw FIELDS SIZE 310,100 OF oDlg
oBrw:bLine :={ || {Str(aData[n]),oGet:SetFocus()}}
oBrw:bGoTop :={ || n:=1 }
oBrw:bGoBottom:={ || n:=Len(aData) }
oBrw:bSkip :={ | nSkip, nOld | nOld := n, n += nSkip,;
n := Max( 1, Min( n, Len(aData) ) ),;
n - nOld }
oBrw:bLogicLen:={ || Len(aData) }
oBrw:cAlias :="Array"
@ 10,2 GET oGet VAR aData[n] OF oDlg SIZE 90, 10
ACTIVATE DIALOG oDlg
RETURN