leandro wrote:No, me toco cambiar toda la sintaxis en lo referente a la definición del xbrowse, use la función ejemplo que me enviaste test1 y como resulto como lo necesitaba, con base en este cambie los datos y solucionado.
Agregando la clausula PIXEL tampoco funciona.
oBrwMs := TXBrowse():New( oP )
oBrwMs:nTop := nT
oBrwMs:nLeft := nL
oBrwMs:nHeight := nH
oBrwMs:nWidth := nW
oBrwMs:nMarqueeStyle := MARQSTYLE_HIGHLROW
oBrwMs:nRowDividerStyle := LINESTYLE_LIGHTGRAY
oBrwMs:nColDividerStyle := LINESTYLE_LIGHTGRAY
oBrwMs:nHeaderLines := 1
oBrwMs:lColDividerComplete := .t.
oBrwMs:lRecordSelector := .t.
oBrwMs:l2007 := .f.
oBrwMs:oFont := oFont1
oBrwMs:nStretchCol := STRETCHCOL_LAST
oBrwMs:bClrRowFocus := { || { CLR_BLACK, RGB( 185, 220, 255 ) } }
oBrwMs:bClrStd := { || { Rgb( 88, 88, 88 ), CLR_WHITE } }
oBrwMs:nColorPen := CLR_HGRAY
oBrwMs:bClrHeader := { || { CLR_BLACK, CLR_WHITE, CLR_HGRAY } }
oBrwMs:bClrFooter := { || { CLR_BLACK, CLR_WHITE, CLR_HGRAY } }
oBrwMs:lFullGrid := .T.
oBrwMs:lRecordSelector := .F.
oBrwMs:lHScroll := .F.
oBrwMs:lVScroll := .F.
oBrwMs:lFitGridHeight := .T.
oBrwMs:nHeaderHeight := 32
oBrwMs:nRowHeight := 27
oBrwMs:lFooter := .t.
oBrwMs:nFooterLines := 1
oBrwMs:nFooterHeight := 30
Application
===========
Path and name: C:\DLYMA\dlyma.exe (32 bits)
Size: 6,577,664 bytes
Compiler version: xHarbour 1.2.3 Intl. (SimpLex) (Build 20190613)
FiveWin version: FWH 19.09
C compiler version: Borland/Embarcadero C++ 7.3 (32-bit)
Windows version: 6.2, Build 9200
Time from start: 0 hours 0 mins 4 secs
Error occurred at: 24/08/2020, 18:56:20
Error description: Error BASE/1005 Message not found: TXBROWSE:LPIXEL
DEFINE WINDOW oWnd FROM nRow, nCol TO nWAlto + nRow, nWAncho + nCol ;
PIXEL TITLE "Movimentos do Dia "+Dtoc(dDataAtual) MENU oMenu ;
COLOR CLR_WHITE, Rgb( 182, 182, 182 ) //NOSYSMENU //NOZOOM //NOMINIMIZE
CreateDocks(oWnd)
ACTIVATE WINDOW oWnd MAXIMIZED
STATIC FUNCTION CreateDocks(oWnd)
LOCAL aRes[2],aPos:={},oFnt,oDock[4]
DEFINE FONT oFnt NAME "CALIBRI" SIZE 0,-16
aRes := {GetSysMetrics(0),GetSysMetrics(1)}
Aadd(aPos,{014,005,370,278})
Aadd(aPos,{014,300,360,aRes[1]-10})
Aadd(aPos,{390,300,aRes[2]/3,aRes[1]-10})
oDock[1] := TDockPnel():New( oWnd )
WITH OBJECT oDock[1]
:SetCoors( aPos[1,1], aPos[1,2], aPos[1,3], aPos[1,4] )
:SetHeightCaption( 40 )
:SetBorderSize( 4 )
:SetCaption( "Calendário" )
:SetColors( CLR_WHITE, METRO_OLIVE, , )
:SetFont( oFnt )
:cAlignText := "CC"
:SetCtrlsPnel( { | o, nT, nL, nH, nW | DefDialog( o, nT, nL, nH, nW, 1 ) } )
:Activate()
END
oDock[2] := TDockPnel():New( oWnd )
WITH OBJECT oDock[2]
:SetCoors( aPos[2,1], aPos[2,2], aPos[2,3], aPos[2,4] )
:SetHeightCaption( 40 )
:SetBorderSize( 4 )
:SetCaption( "Autorizações" )
:SetColors( CLR_WHITE, METRO_OLIVE, , )
:SetFont( oFnt )
:cAlignText := "CC"
:SetCtrlsPnel( { | o, nT, nL, nH, nW | DefDialog( o, nT, nL, nH, nW, 2 ) } )
:Activate()
END
oDock[3] := TDockPnel():New( oWnd )
WITH OBJECT oDock[3]
:SetCoors( aPos[3,1], aPos[3,2], aPos[3,3], aPos[3,4] )
:SetHeightCaption( 40 )
:SetBorderSize( 4 )
:SetCaption( "Faturamento" )
:SetColors( CLR_WHITE, METRO_OLIVE, , )
:SetFont( oFnt )
:cAlignText := "CC"
:SetCtrlsPnel( { | o, nT, nL, nH, nW | DefDialog( o, nT, nL, nH, nW, 3 ) } )
:Activate()
END
oFnt:End()
RETURN nil
STATIC FUNCTION DefDialog( oP, nT, nL, nH, nW, nD )
LOCAL oCol,k,oLbx[3]
//MONTA CALENDÁRIO
IF nD = 1
@ 055,006 XBROWSE oLbx[1] ARRAY aVetMes SIZE 250,197 CELL PIXEL OF oP COLUMNS 1,2,3,4,5,6,7 HEADERS "Dom","Seg","Ter","Qua","Qui","_","Sab" ;
PICTURES "99","99","99","99","99","99","99" SIZES 33,33,33,33,34,34,34 UPDATE
oLbx[1]:CreateFromCode()
ELSEIF nD = 2
@ nT,nL XBROWSE oLbx[2] OF oP SIZE nW, nH PIXEL DATASOURCE oQryAut LINES UPDATE ;
COLUMNS {{"npedido","Nº Pedido",,85},{"razaosc","Cliente",,360},{"valor","Valor","9,999,999.99",85,1},{"usuario","Usuário",,65},{"data","Data",,85},{"hora","Hora",,70}}
oLbx[2]:CreateFromCode()
ELSEIF nD = 3
@ nT+nH,nL XBROWSE oLbx[3] OF oP SIZE nW, nH PIXEL DATASOURCE oQryFat LINES UPDATE ;
COLUMNS {{"nfiscal","Nº Nota",,85},{"razaosc","Cliente",,360},{"valor","Valor","9,999,999.99",85,1},{"usuario","Usuário",,65},{"data","Data",,85},{"hora","Hora",,70}}
oLbx[3]:CreateFromCode()
ENDIF
RETURN nil
aRes := {GetSysMetrics(0),GetSysMetrics(1)}
Aadd(aPos,{ 014, 005, 370, 278 } )
Aadd(aPos,{ 014, 300, 360, aRes[1] - 10 } )
Aadd(aPos,{ 390, 300, aRes[2]/3 + 390, aRes[1] - 10 + 300 } ) // This
oDock[3] := TDockPnel():New( oWnd )
WITH OBJECT oDock[3]
:SetCoors( { | o | XEval( o:oWnd:aControls[ 2 ]:nBottom + 10, o ) }, ; // o:oWnd:aControls[ 2 ] ---> Equal to: oDock[ 2 ]
{ | o | XEval( o:oWnd:aControls[ 2 ]:nLeft, o ) }, ; // o:oWnd:aControls[ 2 ] ---> Equal to: oDock[ 2 ]
{ | o | XEval( o:oWnd:aControls[ 2 ]:nBottom + 10 + 300, o ) }, ; // o:oWnd:aControls[ 2 ] ---> Equal to: oDock[ 2 ]
{ | o | XEval( o:oWnd:aControls[ 2 ]:nRight, o ) } ) // o:oWnd:aControls[ 2 ] ---> Equal to: oDock[ 2 ]
.../...
#INCLUDE "fivewin.Ch"
FUNCTION Start()
LOCAL oWnd,nWAncho,nWAlto,nCol,nRow,oMenu,lExit:=.f.
nWAncho := Int( GetSysMetrics( 0 ) * 0.90 )
nWAlto := Int( GetSysMetrics( 1 ) * 0.95 )
nCol := Int( ( GetSysMetrics( 0 ) - nWAncho ) / 2 )
nRow := Int( ( GetSysMetrics( 1 ) - nWAlto ) / 2 ) + 2
DEFINE WINDOW oWnd FROM nRow, nCol TO nWAlto + nRow, nWAncho + nCol ;
PIXEL TITLE "Teste" MENU oMenu VSCROLL ;
COLOR CLR_WHITE, Rgb( 182, 182, 182 )
CreateDocks(oWnd)
ACTIVATE WINDOW oWnd MAXIMIZED ;
VALID (lExit:=.t.)
StopUntil( { || lExit } )
RETURN nil
STATIC FUNCTION CreateDocks(oWnd)
LOCAL aRes[2],aPos:={},oFnt,oDock[4]
DEFINE FONT oFnt NAME "CALIBRI" SIZE 0,-16
aRes := {GetSysMetrics(0),GetSysMetrics(1)}
Aadd(aPos,{014,005,370,278})
Aadd(aPos,{014,300,360,aRes[1]-20})
Aadd(aPos,{ 390, 300, aRes[2]/3 + 390, aRes[1] - 20 + 300 } )
oDock[1] := TDockPnel():New( oWnd )
WITH OBJECT oDock[1]
:SetCoors( aPos[1,1], aPos[1,2], aPos[1,3], aPos[1,4] )
:SetHeightCaption( 40 )
:SetBorderSize( 4 )
:SetCaption( "Calendário" )
:SetColors( CLR_WHITE, METRO_OLIVE, , )
:SetFont( oFnt )
:cAlignText := "CC"
:SetCtrlsPnel( { | o, nT, nL, nH, nW | DefDialog( o, nT, nL, nH, nW, 1 ) } )
:Activate()
END
oDock[2] := TDockPnel():New( oWnd )
WITH OBJECT oDock[2]
:SetCoors( aPos[2,1], aPos[2,2], aPos[2,3], aPos[2,4] )
:SetHeightCaption( 40 )
:SetBorderSize( 4 )
:SetCaption( "Autorizações" )
:SetColors( CLR_WHITE, METRO_OLIVE, , )
:SetFont( oFnt )
:cAlignText := "CC"
:SetCtrlsPnel( { | o, nT, nL, nH, nW | DefDialog( o, nT, nL, nH, nW, 2 ) } )
:Activate()
END
oDock[3] := TDockPnel():New( oWnd )
WITH OBJECT oDock[3]
:SetCoors( { | o | XEval( o:oWnd:aControls[ 2 ]:nBottom + 10, o ) }, ;
{ | o | XEval( o:oWnd:aControls[ 2 ]:nLeft, o ) }, ;
{ | o | XEval( o:oWnd:aControls[ 2 ]:nBottom + 10 + 300, o ) }, ;
{ | o | XEval( o:oWnd:aControls[ 2 ]:nRight, o ) } )
:SetHeightCaption( 40 )
:SetBorderSize( 4 )
:SetCaption( "Faturamento" )
:SetColors( CLR_WHITE, METRO_OLIVE, , )
:SetFont( oFnt )
:cAlignText := "CC"
:SetCtrlsPnel( { | o, nT, nL, nH, nW | DefDialog( o, nT, nL, nH, nW, 3 ) } )
:Activate()
END
oDock[4] := TDockPnel():New( oWnd )
WITH OBJECT oDock[4]
:SetCoors( { | o | XEval( o:oWnd:aControls[ 3 ]:nBottom + 10, o ) }, ;
{ | o | XEval( o:oWnd:aControls[ 3 ]:nLeft, o ) }, ;
{ | o | XEval( o:oWnd:aControls[ 3 ]:nBottom + 10 + 300, o ) }, ;
{ | o | XEval( o:oWnd:aControls[ 3 ]:nRight, o ) } )
:SetHeightCaption( 40 )
:SetBorderSize( 4 )
:SetCaption( "Baixas" )
:SetColors( CLR_WHITE, METRO_OLIVE, , )
:SetFont( oFnt )
:cAlignText := "CC"
:SetCtrlsPnel( { | o, nT, nL, nH, nW | DefDialog( o, nT, nL, nH, nW, 4 ) } )
:Activate()
END
oFnt:End()
RETURN nil
STATIC FUNCTION DefDialog( oP, nT, nL, nH, nW, nD )
LOCAL oCol,k
IF nD = 1
ELSEIF nD = 2
ELSEIF nD = 3
ELSEIF nD = 4
ENDIF
RETURN nil
oDock[1] := TDockPnel():New( oWnd )
WITH OBJECT oDock[1]
:SetCoors( aPos[1,1], aPos[1,2], aPos[1,3], aPos[1,4] )
:SetHeightCaption( 40 )
:SetBorderSize( 4 )
:SetCaption( "Calendário" )
:SetColors( CLR_WHITE, METRO_OLIVE, , )
:SetFont( oFnt )
:cAlignText := "CC"
:SetCtrlsPnel( { | o, nT, nL, nH, nW | DefDialog( o, nT, nL, nH, nW, 1 ) } )
:Activate()
END
oDock[2] := TDockPnel():New( oWnd )
WITH OBJECT oDock[2]
:SetCoors( aPos[2,1], aPos[2,2], Int( aRes[ 1 ] / 6 ), aPos[2,4] )
:SetHeightCaption( 40 )
:SetBorderSize( 4 )
:SetCaption( "Autorizações" )
:SetColors( CLR_WHITE, METRO_OLIVE, , )
:SetFont( oFnt )
:cAlignText := "CC"
:SetCtrlsPnel( { | o, nT, nL, nH, nW | DefDialog( o, nT, nL, nH, nW, 2 ) } )
:Activate()
END
oDock[3] := TDockPnel():New( oWnd )
WITH OBJECT oDock[3]
:SetCoors( { | o | XEval( o:oWnd:aControls[ 2 ]:nBottom + 10, o ) }, ;
{ | o | XEval( o:oWnd:aControls[ 2 ]:nLeft, o ) }, ;
{ | o | Int( 2 * aRes[ 1 ] / 6 ) + 20 }, ; //XEval( o:oWnd:aControls[ 2 ]:nBottom + 10 + 300, o ) }, ;
{ | o | XEval( o:oWnd:aControls[ 2 ]:nRight, o ) } )
// :SetCoors( aPos[3,1], aPos[3,2], aPos[3,3], aPos[3,4] )
:SetHeightCaption( 40 )
:SetBorderSize( 4 )
:SetCaption( "Faturamento" )
:SetColors( CLR_WHITE, METRO_OLIVE, , )
:SetFont( oFnt )
:cAlignText := "CC"
:SetCtrlsPnel( { | o, nT, nL, nH, nW | DefDialog( o, nT, nL, nH, nW, 3 ) } )
:Activate()
END
oDock[4] := TDockPnel():New( oWnd )
WITH OBJECT oDock[4]
:SetCoors( { | o | XEval( o:oWnd:aControls[ 3 ]:nBottom + 10, o ) }, ;
{ | o | XEval( o:oWnd:aControls[ 3 ]:nLeft, o ) }, ;
{ | o | Int( 3 * aRes[ 1 ] / 6 ) + 30 }, ; //XEval( o:oWnd:aControls[ 3 ]:nBottom + 10 + 300, o ) }, ;
{ | o | XEval( o:oWnd:aControls[ 3 ]:nRight, o ) } )
:SetHeightCaption( 40 )
:SetBorderSize( 4 )
:SetCaption( "Baixas" )
:SetColors( CLR_WHITE, METRO_OLIVE, , )
:SetFont( oFnt )
:cAlignText := "CC"
:SetCtrlsPnel( { | o, nT, nL, nH, nW | DefDialog( o, nT, nL, nH, nW, 4 ) } )
:Activate()
END
oDock[1] := TDockPnel():New( oWnd )
WITH OBJECT oDock[1]
:SetCoors( aPos[1,1], aPos[1,2], aPos[1,3], aPos[1,4] )
:SetHeightCaption( 40 )
:SetBorderSize( 4 )
:SetCaption( "Calendário" )
:SetColors( CLR_WHITE, METRO_OLIVE, , )
:SetFont( oFnt )
:cAlignText := "CC"
:SetCtrlsPnel( { | o, nT, nL, nH, nW | DefDialog( o, nT, nL, nH, nW, 1 ) } )
:Activate()
END
oDock[2] := TDockPnel():New( oWnd )
WITH OBJECT oDock[2]
:SetCoors( aPos[2,1], aPos[2,2], Int( aRes[ 1 ] / 6 ), aPos[2,4] )
:SetHeightCaption( 40 )
:SetBorderSize( 4 )
:SetCaption( "Autorizações" )
:SetColors( CLR_WHITE, METRO_OLIVE, , )
:SetFont( oFnt )
:cAlignText := "CC"
:SetCtrlsPnel( { | o, nT, nL, nH, nW | DefDialog( o, nT, nL, nH, nW, 2 ) } )
:Activate()
END
oDock[3] := TDockPnel():New( oWnd )
WITH OBJECT oDock[3]
:SetCoors( { | o | XEval( o:oWnd:aControls[ 2 ]:nBottom + 10, o ) }, ;
{ | o | XEval( o:oWnd:aControls[ 2 ]:nLeft, o ) }, ;// { | o | Int( 2 * aRes[ 1 ] / 6 ) + 20 }, ;
{ | o | XEval( o:oWnd:aControls[ 2 ]:nBottom + 10 + Int( aRes[ 1 ] / 6 ) , o ) }, ;
{ | o | XEval( o:oWnd:aControls[ 2 ]:nRight, o ) } )
// :SetCoors( aPos[3,1], aPos[3,2], aPos[3,3], aPos[3,4] )
:SetHeightCaption( 40 )
:SetBorderSize( 4 )
:SetCaption( "Faturamento" )
:SetColors( CLR_WHITE, METRO_OLIVE, , )
:SetFont( oFnt )
:cAlignText := "CC"
:SetCtrlsPnel( { | o, nT, nL, nH, nW | DefDialog( o, nT, nL, nH, nW, 3 ) } )
:Activate()
END
oDock[4] := TDockPnel():New( oWnd )
WITH OBJECT oDock[4]
:SetCoors( { | o | XEval( o:oWnd:aControls[ 3 ]:nBottom + 10, o ) }, ;
{ | o | XEval( o:oWnd:aControls[ 3 ]:nLeft, o ) }, ; // { | o | Int( 3 * aRes[ 1 ] / 6 ) + 30 }, ;
{ | o | XEval( o:oWnd:aControls[ 3 ]:nBottom + 10 + Int( aRes[ 1 ] / 6 ) , o ) }, ;
{ | o | XEval( o:oWnd:aControls[ 3 ]:nRight, o ) } )
:SetHeightCaption( 40 )
:SetBorderSize( 4 )
:SetCaption( "Baixas" )
:SetColors( CLR_WHITE, METRO_OLIVE, , )
:SetFont( oFnt )
:cAlignText := "CC"
:SetCtrlsPnel( { | o, nT, nL, nH, nW | DefDialog( o, nT, nL, nH, nW, 4 ) } )
:Activate()
END
Return to FiveWin para Harbour/xHarbour
Users browsing this forum: Google [Bot] and 48 guests