by AIDA » Tue Apr 29, 2008 8:45 pm
Gracias Jfafive
Mi TxBrowse esta muy diferente a tu ejemplo te pongo el mio
espero que el mio se pueda poner en un folder por que seran 4 folders con TxBrowse.
Saludos y gracias
//---------------------------------------------------------//
Function oDbfBrowse2(pErsosS,cFile,oWndD)
local oDlx, oCol, oDlg, oBtnBmp, oBrush, oPersos,oBmp
local cPath,oActiveX,oActiveXX
local OCHO:=0
DEFINE BRUSH oBrush FILE "ima\tapiz5.bmp"
DEFINE DIALOG oDlx RESOURCE "BITA" TRANSPARENT BRUSH oBrush OF oWnd
REDEFINE SAY oPersos VAR pErsosS ID 14 OF oDlx
REDEFINE BITMAP oBmp FILE cFile ID 15 OF oDlx ADJUST
cPath := cFilePath( GetModuleFileName( GetInstance() ) )
oActiveX = TActiveX():Redefine( 16, oDlx, "ShockwaveFlash.ShockwaveFlash.9" )
oActiveXX = TActiveX():Redefine( 19, oDlx, "ShockwaveFlash.ShockwaveFlash.9" )
dbselectarea( "BITACORA" )
dbgotop()
oBrw := TXBrowse():New( oDlx )
oBrw:nMarqueeStyle := 6
obrw:nfreeze:=1
obrw:nfreeze:=2
oBrw:blDblClick:={|| (Sndplaysound("select.wav"),modguarda(oBrw)) }
oBrw:bKeyDown :={|| Sndplaysound("select.wav") }
oBrw:nColDividerStyle := LINESTYLE_BLACK
oBrw:nRowDividerStyle := LINESTYLE_BLACK
oBrw:lColDividerComplete := .t.
oBrw:nHeaderLines := 1
oBrw:nFooterLines := 1
oBrw:lFooter := .t.
oBrw:lFastEdit := .T.
oBrw:bClrStd := {|| {CLR_BLACK, iif( oBrw:nArrayAt % 2 = 0, RGB(245,255,250 ),RGB(176,196,222 ) ) } }
oBrw:bClrStd:= {|| { IIF(BITACORA->TIPO="Falsa Alarma",Rgb(255,0,0),CLR_BLACK) , IIF(OrdKeyNo()%2=0,Rgb(193,221,255),Rgb(221,245,255)) } }
oCol:= oBrw:AddCol()
oCol:cHeader := "TURNO"
oCol:bClrHeader := { || { CLR_RED ,RGB(176,196,222 ) } }
oCol:bStrData := { || ALLTRIM(BITACORA->TURNO)}
oCol:nHeadStrAlign := AL_CENTER
oCol:nDataStrAlign := AL_CENTER
oCol:nWidth := 45
oCol:bRClickHeader := { |nRow,nCol| Alert( oBrw:nColOffSet - 1 + oBrw:MouseColPos( nCol ) ) }
oCol:= oBrw:AddCol()
oCol:cHeader := "UNIDAD"
oCol:bClrHeader := { || {CLR_RED,RGB(176,196,222 ) } }
oCol:bStrData := { || BITACORA->UNIDAD}
oCol:nHeadStrAlign := AL_CENTER
oCol:nDataStrAlign := AL_CENTER
oCol:nWidth := 55
oCol:bRClickHeader := { |nRow,nCol| Alert( oBrw:nColOffSet - 1 + oBrw:MouseColPos( nCol ) ) }
oCol:= oBrw:AddCol()
oCol:cHeader := "FECHA"
oCol:bClrHeader := { || { CLR_RED,RGB(176,196,222 ) } }
oCol:bStrData := { || DToC(BITACORA->FECHA)}
oCol:nHeadStrAlign := AL_CENTER
oCol:nDataStrAlign := AL_LEFT
oCol:nWidth := 65
oCol:bRClickHeader := { |nRow,nCol| Alert( oBrw:nColOffSet - 1 + oBrw:MouseColPos( nCol ) ) }
oCol:= oBrw:AddCol()
oCol:cHeader := "DATOS SERVICIOS"
oCol:bClrHeader := { || { CLR_RED,RGB(176,196,222 ) } }
oCol:bStrData := { || ALLTRIM(BITACORA->DATOS1)}
oCol:nHeadStrAlign := AL_CENTER
oCol:nDataStrAlign := AL_LEFT
oCol:nWidth := 400
oCol:nEditType := EDIT_GET_BUTTON
oCol:bEditBlock := {|| Memo02()}
oCol:bRClickHeader := { |nRow,nCol| Alert( oBrw:nColOffSet - 1 + oBrw:MouseColPos( nCol ) ) }
oCol:bOnPostedit := {|| tone(10,10) }
oCol:= oBrw:AddCol()
oCol:cHeader := "DATOS"
oCol:bClrHeader := { || { CLR_RED,RGB(176,196,222 ) } }
oCol:bStrData := { || "< SOLICITANTE >"}
oCol:nHeadStrAlign := AL_CENTER
oCol:nDataStrAlign := AL_CENTER
oCol:nWidth := 125
oCol:nEditType := EDIT_GET_BUTTON
oCol:bEditBlock := {|| (Memo01() )}
oCol:bRClickHeader := { |nRow,nCol| Alert( oBrw:nColOffSet - 1 + oBrw:MouseColPos( nCol ) ) }
oCol:bOnPostedit := {|| tone(10,10) }
oCol:= oBrw:AddCol()
oCol:cHeader := "REPORTE"
oCol:bClrHeader := { || { CLR_RED,RGB(176,196,222 ) } }
oCol:bStrData := { || "< TURNO >"}
oCol:nHeadStrAlign := AL_CENTER
oCol:nDataStrAlign := AL_CENTER
oCol:nWidth := 91
oCol:bRClickHeader := { |nRow,nCol| Alert( oBrw:nColOffSet - 1 + oBrw:MouseColPos( nCol ) ) }
oCol:nEditType := EDIT_GET_BUTTON
oCol:bEditBlock := {|| Memo03()}
oCol:bOnPostedit := {|| tone(10,10) }
oCol:= oBrw:AddCol()
oCol:cHeader := "FOLIO PARTE + HOSPITAL"
oCol:bClrHeader := { || { CLR_RED,RGB(176,196,222 ) } }
oCol:bStrData := { || ALLTRIM(BITACORA->FOLIO1)+" <-> "+ALLTRIM(BITACORA->FOLIO2)}
oCol:nHeadStrAlign := AL_CENTER
oCol:nDataStrAlign := AL_CENTER
oCol:nWidth := 200
oCol:bRClickHeader := { |nRow,nCol| Alert( oBrw:nColOffSet - 1 + oBrw:MouseColPos( nCol ) ) }
oCol:= oBrw:AddCol()
oCol:cHeader := "TIPO"
oCol:bClrHeader := { || { CLR_RED,RGB(176,196,222 ) } }
oCol:bStrData := { || BITACORA->TIPO}
oCol:nHeadStrAlign := AL_CENTER
oCol:nDataStrAlign := AL_CENTER
oCol:nWidth := 80
oCol:bRClickHeader := { |nRow,nCol| Alert( oBrw:nColOffSet - 1 + oBrw:MouseColPos( nCol ) ) }
oBrw:SetRDD()
oBrw:Refresh( .t. )
oBrw:CreateFromResource( 4 )
REDEFINE BTNBMP oBtnBmp ID 0 OF oDlx file "ima\ico1.ico" ;
ACTION WinExec( "Calc" ) ;
Tooltip "Claves SOS" ;
NOBORDER
oBtnBmp:SetColor( RGB(245,255,250 ),RGB(0,128,128 ) )
REDEFINE BTNBMP oBtnBmp ID 1 OF oDlx file "ima\ico1.ico" ;
ACTION WinExec( "Calc" ) ;
Tooltip "Claves ERUM" ;
NOBORDER
oBtnBmp:SetColor( RGB(245,255,250 ),RGB(0,0,128 ) )
REDEFINE BTNBMP oBtnBmp ID 2 OF oDlx file "ima\ico1.ico" ;
ACTION WinExec( "Calc" ) ;
Tooltip "Claves ROJA" ;
NOBORDER
oBtnBmp:SetColor( RGB(245,255,250 ),RGB(128,0,0 ) )
REDEFINE BTNBMP oBtnBmp ID 3 OF oDlx file "ima\ico1.ico" ;
ACTION WinExec( "Calc" ) ;
Tooltip "Claves PFC" ;
NOBORDER
oBtnBmp:SetColor( RGB(128,128,128 ),RGB(255,255,0 ) )
REDEFINE BUTTON oBtnBmp ID 20 OF oDlx ;
ACTION (oDlx :End())
oBtnBmp:cTooltip:= "SALIR"
REDEFINE BUTTON oBtnBmp ID 9 OF oDlx ;
ACTION altas(pErsosS)
oBtnBmp:cTooltip:= "Regitrar datos de servicio"
REDEFINE BUTTON oBtnBmp ID 10 OF oDlx ;
ACTION (Sndplaysound("select.wav"),modguarda(oBrw))
oBtnBmp:cTooltip:= "Modificar registro no cerrado"
REDEFINE BUTTON oBtnBmp ID 17 OF oDlx ;
ACTION VerMapa2()
oBtnBmp:cTooltip := "Mapa del D,F. se requiere Internet"
oBtnBmp:lTransparent=.T.
ACTIVATE DIALOG oDlx CENTERED ON INIT((oActiveX:SetProp( "wmode", "transparent" ), ;
oActiveX:SetProp( "bgcolor", "C9DAFF" ), ;
oActiveX:SetProp( "menu", "false" ), ;
oActiveX:Do( "LoadMovie", 0, cPath+"relogio.swf" ) ),(oActiveXX:SetProp( "wmode", "transparent" ), ;
oActiveXX:SetProp( "bgcolor", "C9DAFF" ), ;
oActiveXX:SetProp( "menu", "false" ), ;
oActiveXX:Do( "LoadMovie", 0, cPath+"mundo.swf" ) ), oDlx:MOVE(50,250))
RETURN NIL
Que es mejor que programar? creo que nada :)
Atropellada pero aqui ando :P
I love Fivewin
séʌǝɹ ןɐ ɐʇsǝ opunɯ ǝʇsǝ