Hi,
TIA
TFolderEx: How to change the background colour of a tab's pr
TFolderEx: How to change the background colour of a tab's pr
FWH 11.08/FWH 19.12
BCC5.82/BCC7.3
xHarbour/Harbour
BCC5.82/BCC7.3
xHarbour/Harbour
- cmsoft
- Posts: 1294
- Joined: Wed Nov 16, 2005 9:14 pm
- Location: Mercedes - Bs As. Argentina
- Been thanked: 1 time
Re: TFolderEx: How to change the background colour of a tab's pr
Puedes cambiar los colores con la data:
aGradSel
aGradUnSel
aGradOverUnSel
aGradOver
aGradDis
Ejemplo:
aGradSel
aGradUnSel
aGradOverUnSel
aGradOver
aGradDis
Ejemplo:
Code: Select all | Expand
aGradSel := { { 0.5, nRGB( 150, 215, 0 ), nRGB( 100, 173, 0 ) },;
{ 0.75, nRGB( 150, 255, 255 ), nRGB( 150, 255, 255 ) } }
aGradUnSel := { { 0.5, nRGB( 255, 255, 255 ), nRGB( 240, 240, 240 ) },;
{ 0.5, nRGB( 240, 240, 240 ), nRGB( 200, 200, 200 ) } }
aGradOverUnSel := { { 0.25, nRGB( 100, 149, 237 ), nRGB( 100, 149, 237 ) },;
{ 0.75, nRGB( 255, 255, 255 ), nRGB( 200, 200, 200 ) } }
aGradOver := { { 0.5, nRGB( 200, 200, 200), nRGB( 240, 240, 240 ) },;
{ 0.5, nRGB( 240, 240, 240 ), nRGB( 255, 255, 255 ) } }
aGradDis := { { 1, nRGB( 211, 211, 211 ), nRGB( 190, 190, 190) } }
Re: TFolderEx: How to change the background colour of a tab's pr
Thanks for the reply Cesar.
I am close to get the effect that I want (specific tabs have different colour) by amending PainTab() that I found in \SAMPLES.
But using this PainTab() method causes the highlight on the tab when hovering or when a tab is selected to not appear.
Anyone has any solution to that?
Also can someone shows the syntax to create a brush from resource instead of ReadBitmap() a file?
TIA
I am close to get the effect that I want (specific tabs have different colour) by amending PainTab() that I found in \SAMPLES.
But using this PainTab() method causes the highlight on the tab when hovering or when a tab is selected to not appear.
Anyone has any solution to that?
Also can someone shows the syntax to create a brush from resource instead of ReadBitmap() a file?
TIA
Code: Select all | Expand
FUNCTION PaintTab( o, nOption )
LOCAL hBrush, hBmp, nLastRow
IF nOption <= 5
hBmp = ReadBitmap( 0, ud_bmpDir()+"\browback.bmp" )
hBrush = CreatePatternBrush( hBmp )
DeleteObject( hBmp )
nLastRow = o:aPos[ o:aLines[ o:aOrder[ 1 ] ][ 1 ] ][ 2 ] + o:nFolderHeight
SetBrushOrgEx( o:hDC, 1, nLastRow + 2 )
RETURN hBrush
ENDIF
RETURN o:SetFldColors( o, nOption )
FWH 11.08/FWH 19.12
BCC5.82/BCC7.3
xHarbour/Harbour
BCC5.82/BCC7.3
xHarbour/Harbour
- Antonio Linares
- Site Admin
- Posts: 42393
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 9 times
- Been thanked: 41 times
- Contact:
Re: TFolderEx: How to change the background colour of a tab's pr
Dear Hua,
Code: Select all | Expand
#xcommand DEFINE BRUSH [ <oBrush> ] ;
[ STYLE <cStyle> ] ;
[ COLOR <nRGBColor> ] ;
[ <file:FILE,FILENAME,DISK> <cBmpFile> ] ;
[ <resource:RESOURCE,NAME,RESNAME> <cBmpRes> ] ;
[ <grad:GRADIENT> <aGrad> ] ;
[ <cResize:STRETCH,RESIZE,VERTICAL,VERT,HORIZONTAL,HORIZ> ] ;
=> ;
[ <oBrush> := ] TBrush():New( [ Upper(<(cStyle)>) ], <nRGBColor>,;
<cBmpFile>, <cBmpRes>, [<aGrad>], [ Upper(<(cResize)>) ] )