Amigos del foro:
Es posible que los BMP de los botones en la clase METRO sean desde recursos?
Saludos
METHOD AddButton( cCaption, nClrText, nClrPane, lLarge, cImgName, bAction ) CLASS TMetro
local oBtn
local nX := ::nOriginX + ( ::nRow * ( ::nBtnHeight + 8 ) )
local nY := ::nOriginY + ( ::nCol * ( ::nBtnWidth + 8 ) )
DEFAULT lLarge := .F.
if File( cImgName )
@ nX, nY BTNBMP oBtn ;
SIZE ( ::nBtnWidth * If( lLarge, 2, 1 ) ) + If( lLarge, 8, 0 ), ::nBtnHeight ;
OF ::oWnd PROMPT cCaption NOBORDER FILENAME cImgName
else
@ nX, nY BTNBMP oBtn ;
SIZE ( ::nBtnWidth * If( lLarge, 2, 1 ) ) + If( lLarge, 8, 0 ), ::nBtnHeight ;
OF ::oWnd PROMPT cCaption NOBORDER RESOURCE cImgName
endif
oBtn:bAction = bAction
oBtn:SetColor( nClrText, nClrPane )
AAdd( ::aButtons, oBtn )
::nCol++
if lLarge
::nCol++
endif
if ( ATail( ::aButtons ):nLeft + ATail( ::aButtons ):nWidth ) > ( ::nOriginY * 4 ) + 50
::nRow++
::nCol = 0
endif
return nil
@ nX, nY BTNBMP oBtn ;
SIZE ( ::nBtnWidth * If( lLarge, 2, 1 ) ) + If( lLarge, 8, 0 ), ::nBtnHeight ;
OF ::oWnd PROMPT cCaption NOBORDER RESOURCE cImgName
DEFINE METRO oMetro ;
TITLE "AppRpt, Archivos para contabilidad" ;
BACKGROUND ".\earth.bmp"
if File( cFileName )
::hBitmap = ReadBitmap( 0, cFileName )
else
::hBitmap = LoadBitmap( GetResources(), cFileName )
endif
Return to FiveWin para Harbour/xHarbour
Users browsing this forum: Google [Bot] and 30 guests