TExplorerBar
Posted: Sun Aug 30, 2009 12:14 pm
Hola amigos:
Como cambiar el color de la barrar de TExplorerBar ?
Gracias
Como cambiar el color de la barrar de TExplorerBar ?
Gracias
www.FiveTechSoft.com
http://forums.fivetechsoft.com/
Code: Select all
#include "FiveWin.ch"
//----------------------------------------------------------------------------//
function Main()
local oWnd, oExBar, oPanel1, oPanel2, oPanel3, oPanel4
local bClick := { | o | MsgInfo( o:GetText() ) }
DEFINE WINDOW oWnd TITLE "FWH Class TExplorerBar"
oWnd:SetSize( 350, 600 )
oExBar = TExplorerBar():New()
oExBar:nTopColor := RGB( 97, 236, 77 )
oExBar:nBottomColor := RGB( 97, 236, 77 )
oPanel1 = oExBar:AddPanel( "One", "..\bitmaps\32x32\people.bmp" )
oPanel1:lSpecial = .T.
oPanel1:AddLink( "First item", bClick, "..\bitmaps\16x16\additem.bmp" )
oPanel1:AddLink( "Second item", bClick, "..\bitmaps\16x16\copy.bmp" )
oPanel2 = oExBar:AddPanel( "Two", "..\bitmaps\32x32\case.bmp" )
oPanel2:SetColor( CLR_RED, CLR_MAGENTA)
oPanel2:AddLink( "First item", bClick, "..\bitmaps\16x16\adddbf.bmp" )
oPanel2:AddLink( "Second item", bClick, "..\bitmaps\16x16\delete0.bmp" )
oPanel2:AddLink( "Third item", bClick, "..\bitmaps\16x16\envelope.bmp" )
oPanel2:AddLink( "Fourth item", bClick, "..\bitmaps\16x16\copy.bmp" )
oPanel3 = oExBar:AddPanel( "Three", "..\bitmaps\32x32\graphics.bmp" )
oPanel3:AddLink( "First item", bClick, "..\bitmaps\16x16\adddbf.bmp" )
oPanel3:AddLink( "Second item", bClick, "..\bitmaps\16x16\delete0.bmp" )
oPanel3:AddLink( "Third item", bClick, "..\bitmaps\16x16\envelope.bmp" )
oPanel4 = oExBar:AddPanel( "Four" )
oPanel4:AddLink( "First item", bClick, "..\bitmaps\16x16\additem.bmp" )
oPanel4:AddLink( "Second item", bClick, "..\bitmaps\16x16\copy.bmp" )
oWnd:oClient = oExBar
ACTIVATE WINDOW oWnd
return nil
//----------------------------------------------------------------------------//
Very good!! Mui bueno. Gracias por el aporte.compubrion wrote:Saludos !
Puedes cambiar el color del fondo cambiando los valores de
::nTopColor
::nBottomColor
Para los panelses puede usar el method ::SetColor( ::nClrText, ::nClrPane )
Te dejo un ejemploCode: Select all
#include "FiveWin.ch" //----------------------------------------------------------------------------// function Main() local oWnd, oExBar, oPanel1, oPanel2, oPanel3, oPanel4 local bClick := { | o | MsgInfo( o:GetText() ) } DEFINE WINDOW oWnd TITLE "FWH Class TExplorerBar" oWnd:SetSize( 350, 600 ) oExBar = TExplorerBar():New() oExBar:nTopColor := RGB( 97, 236, 77 ) oExBar:nBottomColor := RGB( 97, 236, 77 ) oPanel1 = oExBar:AddPanel( "One", "..\bitmaps\32x32\people.bmp" ) oPanel1:lSpecial = .T. oPanel1:AddLink( "First item", bClick, "..\bitmaps\16x16\additem.bmp" ) oPanel1:AddLink( "Second item", bClick, "..\bitmaps\16x16\copy.bmp" ) oPanel2 = oExBar:AddPanel( "Two", "..\bitmaps\32x32\case.bmp" ) oPanel2:SetColor( CLR_RED, CLR_MAGENTA) oPanel2:AddLink( "First item", bClick, "..\bitmaps\16x16\adddbf.bmp" ) oPanel2:AddLink( "Second item", bClick, "..\bitmaps\16x16\delete0.bmp" ) oPanel2:AddLink( "Third item", bClick, "..\bitmaps\16x16\envelope.bmp" ) oPanel2:AddLink( "Fourth item", bClick, "..\bitmaps\16x16\copy.bmp" ) oPanel3 = oExBar:AddPanel( "Three", "..\bitmaps\32x32\graphics.bmp" ) oPanel3:AddLink( "First item", bClick, "..\bitmaps\16x16\adddbf.bmp" ) oPanel3:AddLink( "Second item", bClick, "..\bitmaps\16x16\delete0.bmp" ) oPanel3:AddLink( "Third item", bClick, "..\bitmaps\16x16\envelope.bmp" ) oPanel4 = oExBar:AddPanel( "Four" ) oPanel4:AddLink( "First item", bClick, "..\bitmaps\16x16\additem.bmp" ) oPanel4:AddLink( "Second item", bClick, "..\bitmaps\16x16\copy.bmp" ) oWnd:oClient = oExBar ACTIVATE WINDOW oWnd return nil //----------------------------------------------------------------------------//