XBrowse header gradient

XBrowse header gradient

Postby StefanHaupt » Wed Aug 29, 2012 12:00 pm

Deear friends,

in this sample the header gradient does not change, what am I doing wrong ?

Code: Select all  Expand view
  #include "FiveWin.ch"
    #include "xbrowse.ch"

    REQUEST DBFCDX

    //----------------------------------------------------------------------------//

    function Main()

       local oDlg, oBrw, oFont

       SET DATE GERMAN
       SET CENTURY ON

       XBrNumFormat( 'E', .t. )

       USE CUSTOMER NEW ALIAS CUST VIA "DBFCDX"

       DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-14
       DEFINE DIALOG oDlg SIZE 750,400 PIXEL FONT oFont
       @ 10,10 XBROWSE oBrw SIZE -10,-10 PIXEL OF oDlg ;
          ALIAS "CUST" ;
          COLUMNS "First", "City", "HireDate", "Age", "Salary" ;
          CELL LINES FOOTERS NOBORDER

          oBrw:bClrGrad := { | lInvert | If( lInvert, ;
                                     { { 0.4, nRGB( 255, 253, 222 ), nRGB( 255, 231, 151 ) }, ;
                                       { 0.6, nRGB( 255, 215,  84 ), nRGB( 255, 233, 162 ) }  ;
                                                                                            }, ;
                                     { { 0.4, nRGB( 219, 230, 244 ), nRGB( 207, 221, 239 ) }, ;
                                       { 0.6, nRGB( 201, 217, 237 ), nRGB( 231, 242, 255 ) }  ;
                                                                                                } ) }

          obrw:CreateFromCode()


       ACTIVATE DIALOG oDlg CENTERED
       RELEASE FONT oFont
       CLOSE DATA

    return nil
 
kind regards
Stefan
StefanHaupt
 
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

Re: XBrowse header gradient

Postby ADutheil » Wed Aug 29, 2012 12:23 pm

Did you try to set bClrHeader?
Regards,

André Dutheil
FWH 13.04 + HB 3.2 + MSVS 10
ADutheil
 
Posts: 368
Joined: Sun May 31, 2009 6:25 pm
Location: Salvador - Bahia - Brazil

Re: XBrowse header gradient

Postby ADutheil » Wed Aug 29, 2012 12:31 pm

I just did and got an error from tbrush class :cry:
Regards,

André Dutheil
FWH 13.04 + HB 3.2 + MSVS 10
ADutheil
 
Posts: 368
Joined: Sun May 31, 2009 6:25 pm
Location: Salvador - Bahia - Brazil

Re: XBrowse header gradient

Postby kok joek hoa » Wed Aug 29, 2012 1:43 pm

Dear Stefan,


Try :

Code: Select all  Expand view
 oBrw:bClrGrad := { | |   { { 0.4, nRGB( 255, 253, 222 ), nRGB( 255, 231, 151 ) }, ;
                                       { 0.6, nRGB( 255, 215,  84 ), nRGB( 255, 233, 162 ) }  }  }


regard,
kok
kok joek hoa
 
Posts: 117
Joined: Tue Jan 03, 2006 6:18 pm

Re: XBrowse header gradient

Postby StefanHaupt » Wed Aug 29, 2012 4:03 pm

Andre,

ADutheil wrote:Did you try to set bClrHeader?


bClrHeader does only accept a pair of colors, no gradient. I tried that before, but you can only use bClrGrad for a new gradient.

Kok,

oBrw:bClrGrad := { | | { { 0.4, nRGB( 255, 253, 222 ), nRGB( 255, 231, 151 ) }, ;
{ 0.6, nRGB( 255, 215, 84 ), nRGB( 255, 233, 162 ) } } }


thanks, your suggestion is working :D
kind regards
Stefan
StefanHaupt
 
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 95 guests