Tengo el siguiente codigo:
- Code: Select all Expand view RUN
- (aAlias[26])->(Dbseek(xnuconduc))
cVar:=(aAlias[26])->Matricula
cVar1:=(aAlias[26])->Codigo+space(2)+"-"+space(2)+(aAlias[26])->Nombre
cAlias1:=aAlias[29]
titulopanta:=" ENVIOS DEL DIA : " + dtoc(cini)
DEFINE DIALOG oDlg FROM 1, 1 TO 50, 205
oDlg:cTitle:=titulo
@ 8, 10 Say oSay PROMPT titulopanta OF oDlg PIXEL SIZE 600,15 COLOR nRGb( 251, 151, 71 ) Font Publicas:frosa
@ 8, 300 Say oSay PROMPT "Matricula" OF oDlg PIXEL SIZE 40,15 //COLOR nRGb( 251, 151, 71 ) Font Publicas:frosa
@ 8, 330 COMBOBOX oCombo VAR cVar ;
ITEMS aItems ;
SIZE 45, 10 ;
OF oDlg ;
COLOR CLR_BLACK, nRGB(226,226,208) ;
ON CHANGE ((Grabamatricula(cVar,aAlias)),oCombo:Refresh(),.T.);
PIXEL
// @ 8, 700 BTNBMP RESOURCE "Conecta" SIZE 70,15 OF oDlg NOBORDER LEFT PROMPT "Rescatar Impresos" ACTION ( Rescata(aAlias,cini), oBrw1:SetFocus() )
@ 17, 10 Say oSay PROMPT titulopanta1 OF oDlg PIXEL SIZE 380,15 COLOR nRGb( 251, 151, 71 ) Font Publicas:frosa
// oSay:lTransparent := .t.
oDlg:cTooltip := {"Los Albaranes con Bultos y Kilos en Rojo"+CRLF+"Significa que estan ya impresos"+CRLF+"y no se van a imprimir","INFORMACION"}
//-----------Primer browse
@ 30, 0 xbrowse oBrw1 OF oDlg ;
ALIAS cAlias1;
COLUMNS " ","Ruta","Nruta","Conductor","Nombre";
AUTOCOLS LINES CELL FOOTERS NOBORDER SIZE 175,-30 PIXEL
AEval( oBrw1:aCols, {|oCol|oCol:lAllowSizing := .f. } )
AEval( oBrw1:aCols, { |o| o:oDataFont := oFont2} )
WITH OBJECT oBrw1:aCols[ 1 ]
:cHeader := "Sel"
:bEditValue := { || AScan( oBrw1:aSelected, oBrw1:BookMark ) > 0 }
:nEditType := EDIT_GET
:SetCheck(nil,.t.)
END
WITH OBJECT oBrw1:aCols[ 2 ]
:oHeaderFont:=oFont1
:nWidth := 20
:nDataStrAlign := AL_CENTER
// :oDataFont:=oFont3
END WITH
WITH OBJECT oBrw1:aCols[ 3 ]
:oHeaderFont:=oFont1
:nWidth := 90
// :oDataFont:=oFont2
:oFooterFont:= Publicas:frosa
:bFooter := { || "SELECCION" }
END WITH
WITH OBJECT oBrw1:aCols[ 4 ]
:cHeader:= "Num."
:nWidth := 40
:oHeaderFont:=oFont1
:nDataStrAlign := AL_CENTER
:oFooterFont:= Publicas:frosa
:bFooter := { || Len( oBrw1:aSelected ) }
:nFootStrAlign := 1
// :oDataFont:=oFont3
END WITH
WITH OBJECT oBrw1:aCols[ 5 ]
:cHeader:= "Nombre"
:nWidth := 95
:oHeaderFont:=oFont1
// :oDataFont:=oFont2
END WITH
WITH OBJECT oBrw1
:SetGroupHeader( "Ruta" , 1, 3, ofont)
:SetGroupHeader( "Conductor", 4, 5, ofont)
:nColDividerStyle := LINESTYLE_BLACK
:lColDividerComplete := .T.
:l2007 := .T.
:lRecordSelector := .F.
:lAllowColHiding := .F.
:lAllowColSwapping := .F.
:nStretchCol := STRETCHCOL_WIDEST
:bClrSel := { || { CLR_BLUE, CLR_YELLOW } }
:lHscroll:=.F.
:nRowHeight := 30
:nHeadStrAligns:= AL_CENTER
:bChange := {||cVar:=ponmatricula(aAlias,oBrw1:aCols[4]:value),oCombo:Refresh(),xnuconduc:=oBrw1:aCols[4]:value,aData2:=creaelarray2(xnuconduc),aData3:=creaelarray3(xnuconduc),;
oBrw2:aArrayData:=aData2,oBrw3:aArrayData:=aData3,oBrw1:Refresh(),oBrw2:Refresh(),oBrw3:Refresh(),oSay1:Refresh(),oSay2:Refresh(),cVar1:=oBrw1:aCols[4]:Value+space(3)+"-"+space(3)+oBrw1:aCols[5]:Value,oCombo1:Update()}
:bClrStd:= { || { CLR_BLACK, If( oBrw1:KeyNo % 2 == 0, nRGB(242,247,252),nRGB(207,222,240) ) } }
:nMarqueeStyle := MARQSTYLE_HIGHLROWMS //6
:MakeTotals()
:CreateFromCode()
END WITH
@ 8, 500 Say oSay PROMPT "Ruta" OF oDlg PIXEL SIZE 35,15 //COLOR nRGb( 251, 151, 71 ) Font Publicas:frosa
@ 8, 530 Say oSay1 PROMPT oBrw1:aCols[2]:Value OF oDlg PIXEL SIZE 35,15 update//COLOR nRGb( 251, 151, 71 ) Font Publicas:frosa
@ 8, 540 Say oSay2 PROMPT alltrim(oBrw1:aCols[3]:Value) OF oDlg PIXEL SIZE 70,15 update//COLOR nRGb( 251, 151, 71 ) Font Publicas:frosa
@ 8, 610 COMBOBOX oCombo1 VAR cVar1 ;
ITEMS aItems1 ;
SIZE 120, 10 ;
OF oDlg ;
COLOR CLR_BLACK, nRGB(226,226,208) ;
PIXEL UPDATE
y Cuando hago bChange en oBrw1, hace todo correctamente, actualiza los says etc, pero no consigo que me actualice el valor de cVar1 en el COMBOBOX