I open a window that displays a browse.
I use the up and down arrows to skip the records in the browse, the selected record being white on blue while all other records are black on white.
There is a button (or I detect a keyboard key) that calls a sub function to do some data entry.
When I call this function, the selected record becomes white on grey (probably meaning that it is disabled).
When I come back from the sub function, the record stays disabled (white on grey).
If I use the scroll bar, there is no problem, the focus goes to the next (previous) record and it is enabled (white on blue).
The problem is when I want to skip with the arrow keys. I need to pess this key a few but variable number of times before it seems recognized.
How can I change the program so that the record is enabled when returning from the sub function ?
The following code is an extract of a more complex routine:
- Code: Select all Expand view
- iif(nKey == Asc("3"),;
(nEss := oF10b:ESSENCE,;
iif (cMethode == "M" .AND.;
(nEss == 41 .OR. nEss == 42 .OR. nEss == 150 .OR. nEss == 151),;
cRet := "P",cRet := cMethode),;
DetAddSel(aFichiers,Str(nEss),Str(oF10b:SOUS_CODE),cRet,"edit"),;
oBrw:refresh(),;
MsgInfo("*"),;
oBrw:SetFocus()),;
Remark that MsgInfo("*") is executed but the browse doesn't seem to receive the focus.
Regards,
Raymond