TExplorerBar

TExplorerBar

Postby PREGUNTON » Sun Aug 30, 2009 12:14 pm

Hola amigos:

Como cambiar el color de la barrar de TExplorerBar ?

Gracias
PREGUNTON
 
Posts: 12
Joined: Sat Aug 29, 2009 2:48 am

Re: TExplorerBar

Postby leandro » Thu Aug 03, 2017 8:50 pm

Hola buenas tardes

Retomando el tema.

Es posible cambiar la apariencia de la TExplorerBar?

Saludos
Saludos
LEANDRO AREVALO
Bogotá (Colombia)
https://hymlyma.com
https://hymplus.com/
leandroalfonso111@gmail.com
leandroalfonso111@hotmail.com

[ Embarcadero C++ 7.60 for Win32 ] [ FiveWin 23.07 ] [ xHarbour 1.3.0 Intl. (SimpLex) (Build 20230914) ]
User avatar
leandro
 
Posts: 1669
Joined: Wed Oct 26, 2005 2:49 pm
Location: Colombia

Re: TExplorerBar

Postby compubrion » Thu Aug 03, 2017 9:15 pm

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 ejemplo
Code: Select all  Expand view

#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

//----------------------------------------------------------------------------//
 
Harbour / Bcc / MinGW / Fwh 13.9
User avatar
compubrion
 
Posts: 130
Joined: Thu Mar 08, 2007 6:12 pm
Location: Miranda - Venezuela

Re: TExplorerBar

Postby karinha » Fri Aug 04, 2017 2:12 pm

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 ejemplo
Code: Select all  Expand view

#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.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7794
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: TExplorerBar

Postby leandro » Wed Aug 16, 2017 3:36 pm

Compubrion muchas gracias por responder

Hice los cambios que mencionaste y funciona, pero no me daban el efecto que queria lograr. Buscando en el foro encontre una clase desarrollada por Andres Reyes Hernandez. La cual se ajusta mucho mas a lo que quiero.

Image

Muchas Gracias
Saludos
LEANDRO AREVALO
Bogotá (Colombia)
https://hymlyma.com
https://hymplus.com/
leandroalfonso111@gmail.com
leandroalfonso111@hotmail.com

[ Embarcadero C++ 7.60 for Win32 ] [ FiveWin 23.07 ] [ xHarbour 1.3.0 Intl. (SimpLex) (Build 20230914) ]
User avatar
leandro
 
Posts: 1669
Joined: Wed Oct 26, 2005 2:49 pm
Location: Colombia


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: russimicro and 56 guests