different backgroundcolors for each column

different backgroundcolors for each column

Postby Marc Vanzegbroeck » Sun Jul 27, 2008 2:19 pm

Hi,

Is it possible to have in each column an other backgroundcolor with the normal browse or should I use xBrowse?

Thanks,
Marc
Marc Vanzegbroeck
 
Posts: 1159
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium

Postby Antonio Linares » Sun Jul 27, 2008 3:57 pm

Marc,

You can have different background colors for each column with TWBrowse this way:

oBrowse:nClrPane := { | nCol | ColumnColor( nCol ) }

where function ColumnColor( nColumn ) should return the nRGB() color to use for each column
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Marc Vanzegbroeck » Sun Jul 27, 2008 7:32 pm

Antonio,

I use
Code: Select all  Expand view
func ColumnColor(ncol)
local ret_val
   msginfo(ncol)
   if ncol= 1
      ret_val = arts->hkleur
   else
      ret_val = arts->kleur
   endif
return ret_val


The fields arts->hkleur and arts->kleur are holding the rgb color.
I inserted a msginfo() to see the value in ncol but it's always returing nil. How do I know the column number?

Thanks,
Marc
Marc Vanzegbroeck
 
Posts: 1159
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium

Postby Antonio Linares » Sun Jul 27, 2008 7:48 pm

Marc,

What FWH version are you using ?

Please check that you have this code in Class TWBrowse, function wBrwLine()
Code: Select all  Expand view
SetBkColor( hDC, If( nColAct != nil, If( ValType( nClrBack ) == "B",;
                             Eval( nClrBack, n ), nClrBack ),;
                             If( ValType( nClrPane ) == "B", Eval( nClrPane, n ), nClrPane ) ) )
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Marc Vanzegbroeck » Sun Jul 27, 2008 8:06 pm

Antonio,

I use FWH7.10.

I have this line
Code: Select all  Expand view
               SetBkColor( hDC, If( nColAct != nil, If( ValType( nClrBack ) == "B",;
                             Eval( nClrBack ), nClrBack ), nClrPane ) )


Regards,
Marc
Marc Vanzegbroeck
 
Posts: 1159
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium

Postby Antonio Linares » Sun Jul 27, 2008 8:20 pm

Marc,

Please modify it as I have described it

Anyhow, if you want that one and many other new features, then I suggest you to upgrade to current FWH 8.07
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Marc Vanzegbroeck » Mon Jul 28, 2008 7:00 am

Thanks Antonio,

It"s working now!!!

Marc
Marc Vanzegbroeck
 
Posts: 1159
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 40 guests