Ya hace varias versiónes de fw que se han adoptado nuevas formas de escribir el código, la mayoria de las novedades vienen de Mr.Nages y Cristobal, las he visto en los samples de xbrowse, y tambien en el siguiente código, me gustaría saber que hacen los caracteres contenedores <||> y de que manera se pueden usar. Así como también el tema de la definición de los objetos con la sintaxis WITH OBJECT END WITH
- Code: Select all Expand view RUN
oDlg:bInit := <||
@ 30, 50 XIMAGE oImage[1] RESOURCE "Icon1" OF oDlg NOBORDER
@ 30, 200 XIMAGE oImage[2] RESOURCE "Icon2" OF oDlg NOBORDER
@ 30, 350 XIMAGE oImage[3] RESOURCE "Icon3" OF oDlg NOBORDER
AEval( oImage, {|o, n| o:lTransparent := .T. } )
return nil
>
...
oExplBar := TExplorerBar():New( nHSay + 3, 1, nPosVSp - 1, oWnd:nHeight() - 2, oWnd, , , , , , , )
oExplBar:nTopColor := Rgb( 240, 240, 240 )
oExplBar:nBottomColor := aGrad[ 1 ][ 2 ]
AAdd( aPnels, oExplBar:AddPanel( "DATABASES", "C:\dlyma\Res\pan32.png", , 40, 0, aGrad, oFont, CLR_WHITE, CLR_WHITE ) )
WITH OBJECT Atail( aPnels ) //oPanel1
//:nOffSetX := 100
:nClrTextSpecial := CLR_WHITE
:nClrHover := Rgb( 0, 0, 0 ) //RGB( 66, 142, 255 )
:nOffSetY := 12
:LoadBitmaps( 1, "D:\Fwh\FwhTeam\BmpsVS_32\CheckOut_16x_32.bmp" )
:LoadBitmaps( 2, "D:\Fwh\FwhTeam\BmpsVS_32\CheckIn_16x_32.bmp" )
:nTopMargin := 1
:nLeftMargin := nWPanel + 22
:nRightMargin := 10
:nLeft := aPnels[ 1 ]:nLeftMargin
:nRight := oWnd:nWidth - aPnels[ 1 ]:nRightMargin
:AddLink( "Open", bClick, "C:\dlyma\Res\icon3.bmp", , METRO_OLIVE, , )
:AddLink( "Explorer", bClick, "D:\Fwh\FwhTeam\BmpsVS_32\DatabaseAuditSpecification_16x_32.bmp", , METRO_OLIVE, , )
:AddLink( "Structure", bClick, "D:\Fwh\FwhTeam\BmpsVS_32\Databar_16x_32.Bmp", , METRO_OLIVE, , )
:AddLink( "Tools", bClick, "D:\Fwh\FwhTeam\BmpsVS_32\DatabaseOptions_12882_32.bmp", , METRO_OLIVE, , )
:AddLink( "Close", bClick, "D:\Fwh\FwhTeam\BmpsVS_32\DatabaseOffline_16x_32.bmp", , METRO_OLIVE, , )
END
WITH OBJECT oExplBar
AAdd( aPnels, :AddPanel( "TOOLS", "C:\dlyma\Res\cart.png", , 40, 0, aGrad, oFont, CLR_WHITE, CLR_WHITE ) )
AAdd( aPnels, :AddPanel( "EDITOR", "D:\Fwh\FwhTeam\BmpsVS_32\FrameworkDesignStudio_32x_24.bmp", , 40, 0, aGrad, oFont, CLR_WHITE, CLR_WHITE ) )
AAdd( aPnels, :AddPanel( "EXPLORER", "D:\Fwh\FwhTeam\BmpsVS_32\FileDialogReport_32x_24.bmp", , 40, 0, aGrad, oFont, CLR_WHITE, CLR_WHITE ) )
AAdd( aPnels, :AddPanel( "EXP./IMPORT", "D:\Fwh\FwhTeam\BmpsVS_32\GetTextFormat_32x_24.Bmp", , 40, 0, aGrad, oFont, CLR_WHITE, CLR_WHITE ) )
AAdd( aPnels, :AddPanel( "USERS", "D:\Fwh\FwhTeam\BmpsVS_32\LookupPrincipal_32x_24.bmp", , 40, 0, aGrad, oFont, CLR_WHITE, CLR_WHITE ) )
For nPanel := 2 to Len( aPnels )
WITH OBJECT :aPanels[ nPanel ]
//:lSpecial := .T.
//:nOffSetX := 60
:lCollapsed := .T.
:LoadBitmaps( 1, "D:\Fwh\FwhTeam\BmpsVS_32\CheckOut_16x_32.bmp" )
:LoadBitmaps( 2, "D:\Fwh\FwhTeam\BmpsVS_32\CheckIn_16x_32.bmp" )
:nClrTextSpecial := CLR_WHITE
:nClrHover := Rgb( 0, 0, 0 )
:nTopMargin := 1
:nLeftMargin := nWPanel + 22
:nRightMargin := 10
:nLeft := :nLeftMargin
:nRight := oWnd:nWidth - :nRightMargin
:nHeight := :nTitleHeight
END
For nItem := nPanel + 1 To Len( :aPanels )
:aPanels[ nItem ]:nTop -= ( :aPanels[ nPanel ]:nBodyHeight )
Next
Next
:CheckScroll()
END WITH
De antemano gracias