TReBar
Posted: Fri Jun 02, 2006 4:18 am
He codificado, según el ejemplo.
local oWnd, oReBar, oToolBar, oPanel, oBtn1, oFolder, oToolBar2
local oImageList
DEFINE WINDOW oWnd TITLE "Testing rebars and toolbars" ;
MENU BuildMenu()
oReBar = TReBar():New( oWnd )
oPanel := TPanel():New( 0, 0, 75, 300, oReBar )
oImageList = TImageList():New()
oImageList:AddMasked( TBitmap():Define( , "new2.bmp", oWnd ),;
nRGB( 255, 0, 255 ) )
oImageList:AddMasked( TBitmap():Define( , "open2.bmp", oWnd ),;
nRGB( 255, 0, 255 ) )
oImageList:Add( TBitmap():Define( , "icon.bmp", oWnd ),;
TBitmap():Define( , "icoMask.bmp", oWnd ) )
oToolBar = TToolBar():New( oPanel, 33, 33, oImageList )
oToolBar:nLeft = 5
oToolBar:AddButton( { || MsgInfo( "New" ) }, "New" ) // , "new file" )
oToolBar:AddButton( { || MsgInfo( "Open" ) }, "Open" )
oToolBar:AddButton( { || MsgInfo( "three" ) }, "three" )
oToolBar:AddSeparator()
oToolBar:AddButton( { || MsgInfo( "four" ) }, "four" )
oReBar:InsertBand( oPanel )
@ 10, 2 FOLDER oFolder PROMPTS "One", "Two", "Three" SIZE 400, 62
oToolBar2 = TToolBar():New( oFolder:aDialogs[ 1 ],,, oImageList )
oToolBar2:AddButton( { || MsgInfo( "pointer" ) }, "pointer" )
oToolBar2:AddSeparator()
oToolBar2:AddButton( ,"label" )
oToolBar2:AddButton( ,"button" )
oReBar:InsertBand( oFolder )
DEFINE STATUSBAR OF oWnd PROMPT "Rebars and Toolbars test"
ACTIVATE WINDOW oWnd MAXIMIZED
oImageList:End()
Pero no se visualizan los Bitmaps a pesar que dichos archivos existen. Gracias por su respueta
Fwh 2.5 Noviembre for Xharbour 0.99.2
local oWnd, oReBar, oToolBar, oPanel, oBtn1, oFolder, oToolBar2
local oImageList
DEFINE WINDOW oWnd TITLE "Testing rebars and toolbars" ;
MENU BuildMenu()
oReBar = TReBar():New( oWnd )
oPanel := TPanel():New( 0, 0, 75, 300, oReBar )
oImageList = TImageList():New()
oImageList:AddMasked( TBitmap():Define( , "new2.bmp", oWnd ),;
nRGB( 255, 0, 255 ) )
oImageList:AddMasked( TBitmap():Define( , "open2.bmp", oWnd ),;
nRGB( 255, 0, 255 ) )
oImageList:Add( TBitmap():Define( , "icon.bmp", oWnd ),;
TBitmap():Define( , "icoMask.bmp", oWnd ) )
oToolBar = TToolBar():New( oPanel, 33, 33, oImageList )
oToolBar:nLeft = 5
oToolBar:AddButton( { || MsgInfo( "New" ) }, "New" ) // , "new file" )
oToolBar:AddButton( { || MsgInfo( "Open" ) }, "Open" )
oToolBar:AddButton( { || MsgInfo( "three" ) }, "three" )
oToolBar:AddSeparator()
oToolBar:AddButton( { || MsgInfo( "four" ) }, "four" )
oReBar:InsertBand( oPanel )
@ 10, 2 FOLDER oFolder PROMPTS "One", "Two", "Three" SIZE 400, 62
oToolBar2 = TToolBar():New( oFolder:aDialogs[ 1 ],,, oImageList )
oToolBar2:AddButton( { || MsgInfo( "pointer" ) }, "pointer" )
oToolBar2:AddSeparator()
oToolBar2:AddButton( ,"label" )
oToolBar2:AddButton( ,"button" )
oReBar:InsertBand( oFolder )
DEFINE STATUSBAR OF oWnd PROMPT "Rebars and Toolbars test"
ACTIVATE WINDOW oWnd MAXIMIZED
oImageList:End()
Pero no se visualizan los Bitmaps a pesar que dichos archivos existen. Gracias por su respueta
Fwh 2.5 Noviembre for Xharbour 0.99.2