I added this sample to my sample-collector with some more options / tests.
1. Moving to browser top, left, bottom and right on button-action.
2. added a seekbar to browser 1 and 2
The sample displays 2 browser from resources
I noticed that the seekbar on browser 2 is not displayed.
Typing something in browser 2, the seek works
[img:2vw6dz41]http://www.pflegeplus.com/IMAGES/Sync5.jpg[/img:2vw6dz41]
...
...
DBSELECTAREA( "CUST1" )
DBSETORDER("CUST2")
CUST1->(DBGOTOP())
REDEFINE SAY oSay1 ID 105 PROMPT "CUST1.dbf -> set synchron to CUST2.dbf" OF oDlgMain FONT oMedium
oSay1:lTransparent := .T.
REDEFINE XBROWSE oBrw1 ID 110 OF oDlgMain ;
ALIAS 'CUST1' CELL LINES AUTOCOLS FONT oSFont COLOR 0, 14417848
oBrw1:lSeekBar := .t.
oBrw1:bClrEdits := { || { CLR_HRED, CLR_YELLOW } }
WITH OBJECT oBrw1
:bRecSelData := { || CUST1->(ORDKEYNO()) }
:bRecSelHeader := { |brw| "No." }
:bRecSelFooter := { |brw| brw:nLen }
:nRecSelWidth := 50
END
DBSELECTAREA( "CUST2" )
DBSETORDER("S_CUST")
CUST2->(DBGOTOP())
REDEFINE SAY oSay2 ID 115 PROMPT "CUST2.dbf -> set synchron to CUST1.dbf" OF oDlgMain FONT oMedium
oSay2:lTransparent := .T.
REDEFINE XBROWSE oBrw2 ID 120 OF oDlgMain ;
ALIAS 'CUST2' CELL LINES AUTOCOLS FONT oSFont COLOR 0, 14211327
[color=#FF0000:2vw6dz41]oBrw2:lSeekBar := .t.
oBrw2:bClrEdits := { || { CLR_HRED, CLR_YELLOW } }[/color:2vw6dz41]
WITH OBJECT oBrw2
:bRecSelData := { || CUST2->(ORDKEYNO()) }
:bRecSelHeader := { |brw| "No." }
:bRecSelFooter := { |brw| brw:nLen }
:nRecSelWidth := 50
END
oBrw1:lColChangeNotify := .t.
oBrw1:bGotFocus := { || SyncBrowses( oBrw1, oBrw2 ) }
oBrw1:bChange := { || If( oBrw1:lFocused, SyncBrowses( oBrw1, oBrw2 ), nil ) }
oBrw2:lColChangeNotify := .t.
oBrw2:bGotFocus := { || SyncBrowses( oBrw2, oBrw1 ) }
oBrw2:bChange := { || If( oBrw2:lFocused, SyncBrowses( oBrw2, oBrw1 ), nil ) }
...
...
regards
Uwe
↧