Available in:
 
Apps (win)  
Apps (char)  
Reportwriter  
RPC  
Standalone PL 
 
X    
  
  
  
  
   
int focus(type[,id]) int type,id
| type |  specifies focus. False (0) specifies field focus; true
(nonzero) specifies window focus.
 
  | 
| id |  (optional) specifies a widget id when type = 0
 if id is specified and type is false then the focus is set on widget id.  | 
{ int i;
  i = p.ar;
  p.ar = focus(false) % field_rows();
  list_seek(p.wl,list_pos(p.wl)+p.ar-i);
  p.af = focus(false) / field_rows();
}