I have a xbrowse in a DIALOG and in a column with EDIT_LISTBOX, the case is that in edition instead of continuing to the following column, it goes on to the following control, in WINDOW it walks well, the problem presents it in dialogs and when we put another control besides the xbrowse, for example I have the xbrowse and a button, when I have a column with edit_listbox instead of going on to the near column of the browse, the focus goes on to the button
Here I leave an example that reproduces the mistake
- Code: Select all Expand view RUN
#include "fivewin.ch"
#include "xbrowse.ch"
function main()
local aData := {}
local oWnd, oBrw, oBar
define dialog oWnd size 600, 300
@ 10,0 xbrowse oBrw of oWnd ;
header 'one','two','tipo', "cuatro" ;
columns 1, 2, 3, 4 ;
colsizes 50,70,50,70 ;
pictures '999','mmm dd, yyyy', "9999.99" ;
SIZE 300, 300 PIXEL ;
array aData lines cell fastedit footers
WITH OBJECT oBrw
:bClrStd := { || If( oBrw:KeyNo() % 2 == 0, ;
{ CLR_BLACK, RGB( 224, 236, 255 ) }, ;
{ CLR_BLACK, RGB( 189, 211, 253 ) } ) }
:bPastEof := { || AddRow( oBrw ) }
:bKeyDown := {| nKey | If( nKey == VK_DELETE, DelRow( oBrw ), ) }
END
AEval( oBrw:aCols, { |o| o:nEditType := EDIT_GET } )
WITH OBJECT oBrw:tipo
:nEditType := EDIT_LISTBOX
:aEditListBound := ;
:aEditListTxt := { "NOV", "NTO", "TOR", "VAC", "VAQ", "TM ", "TH " }
END
WITH OBJECT oBrw:cuatro
:nTotal := 0
:lTotal := .t.
END
WITH OBJECT oBrw
:bClrStd := { || If( oBrw:KeyNo() % 2 == 0, ;
{ CLR_BLACK, RGB( 224, 236, 255 ) }, ;
{ CLR_BLACK, RGB( 189, 211, 253 ) } ) }
:bPastEof := { || AddRow( oBrw ) }
:bKeyDown := {| nKey | If( nKey == VK_DELETE, DelRow( oBrw ), ) }
:MakeTotals()
END
oBrw:CreateFromCode()
// oWnd:oClient := oBrw
@ 60,10 BUTTONBMP PROMPT "OK" OF oWnd ACTION oWnd:End() SIZE 120, 20 PIXEL
activate dialog oWnd on init ( MakeBar( oWnd, oBrw ), oWnd:Resize() )
return nil
static function AddRow( oBrw )
static n := 0
AAdd( oBrw:aArrayData, { n, date()+n, "NOV", 0 } )
n++
oBrw:GoBottom()
oBrw:Refresh()
oBrw:SetFocus()
return nil
static function DelRow( oBrw )
if oBrw:nLen > 0
ADel( oBrw:aArrayData, oBrw:nArrayAt )
ASize( oBrw:aArrayData, oBrw:nLen - 1 )
oBrw:Refresh()
endif
oBrw:SetFocus()
return nil
function MakeBar( oWnd, oBrw )
local oBar
define buttonbar oBar size 100,32 of oWnd 2007
define button of oBar prompt 'AddRow' action AddRow( oBrw )
define button of oBar prompt 'DeleteRow' action DelRow( oBrw )
return oBar
Regards.