Bug in TWBrowse - nClrPane

Bug in TWBrowse - nClrPane

Postby Enrico Maria Giordano » Sun Jun 01, 2008 3:38 pm

Just move the cursor on the second column and you will see the first column becoming green:

Code: Select all  Expand view  RUN
#include "Fivewin.ch"


FUNCTION MAIN()

    LOCAL oDlg, oBrw

    USE TEST

    DEFINE DIALOG oDlg;
           SIZE 400, 400

    @ 0, 0 LISTBOX oBrw FIELDS TEST -> last,;
                               TEST -> first

    oBrw:bLogicLen = { || LastRec() }

    oBrw:lCellStyle = .T.

    oBrw:nClrPane = { | nCol | If( nCol = 1, CLR_HRED, CLR_HGREEN ) }

    ACTIVATE DIALOG oDlg;
             ON INIT oDlg:SetControl( oBrw );
             CENTER

    CLOSE

    RETURN NIL


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8718
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby Antonio Linares » Mon Jun 02, 2008 1:05 pm

Enrico,

Have you tested it with previous versions of FWH 8.05 ? thanks,

I mean 8.04, 8.03, ...
regards, saludos

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

Postby Enrico Maria Giordano » Mon Jun 02, 2008 1:43 pm

nClrPane is a codeblock starting from the current 8.05.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8718
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby Antonio Linares » Mon Jun 02, 2008 5:20 pm

Enrico,

Yes, you are right, thanks :-)
regards, saludos

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

Postby Antonio Linares » Mon Jun 02, 2008 6:24 pm

It seems related to oBrw:lCellStyle = .T.

without it, it works fine

I keep searching...
regards, saludos

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

Postby Antonio Linares » Wed Jul 16, 2008 10:09 am

Enrico,

Fixed! This is the right code for Class TWBrowse line 2282-2284 (a n was missing):
Code: Select all  Expand view  RUN
               SetBkColor( hDC, If( nColAct != nil, If( ValType( nClrBack ) == "B",;
                             Eval( nClrBack, n ), nClrBack ),;
                             If( ValType( nClrPane ) == "B", Eval( nClrPane, n ), nClrPane ) ) )

Thanks! :-)
regards, saludos

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

Postby Enrico Maria Giordano » Wed Jul 16, 2008 11:10 am

Thank you!

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8718
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby anserkk » Thu Jul 17, 2008 6:47 am

Where can I find TWBrowse.Prg to make the updation.

I expected TWBrowse.Prg in the folder \FWH\Source\Classes but I could not find the same anywhere in the FWH Folder

Regards

Anser
FWH 8.06

Antonio Linares wrote:Enrico,

Fixed! This is the right code for Class TWBrowse line 2282-2284 (a n was missing):
Code: Select all  Expand view  RUN
               SetBkColor( hDC, If( nColAct != nil, If( ValType( nClrBack ) == "B",;
                             Eval( nClrBack, n ), nClrBack ),;
                             If( ValType( nClrPane ) == "B", Eval( nClrPane, n ), nClrPane ) ) )

Thanks! :-)
User avatar
anserkk
 
Posts: 1333
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India

Postby nageswaragunupudi » Thu Jul 17, 2008 8:08 am

\FWH\source\classes\wbrowse.prg
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10653
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Postby Rick Lipkin » Thu Jul 17, 2008 2:08 pm

Anser

You have to ( also ) make the same edit just above those lines and add the ,n to nClrText

Rick
User avatar
Rick Lipkin
 
Posts: 2666
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Postby anserkk » Fri Jul 18, 2008 10:05 am

Thank you,

Mr.Nageswaragunupudi and Mr.Rick Lipkin.

As per your advice I updated \FWH\source\classes\wbrowse.prg

Regards
Anser
User avatar
anserkk
 
Posts: 1333
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India

Postby driessen » Fri Jul 18, 2008 3:30 pm

Hello,

This topic is about the background color of columns in a listbox.

But how do I define the background color of a row ?

Thanks.
Regards,

Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Postby Enrico Maria Giordano » Fri Jul 18, 2008 3:44 pm

driessen wrote:Hello,

This topic is about the background color of columns in a listbox.

But how do I define the background color of a row ?

Thanks.


Code: Select all  Expand view  RUN
oBrw:nClrPane = { | nCol | If( YourCondition, CLR_HRED, CLR_HGREEN ) }


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8718
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby driessen » Fri Jul 18, 2008 8:03 pm

Enrico,

Isn't your example to define the color of a column ? I want to change the background color of a row.

Thanks.
Regards,

Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Postby Enrico Maria Giordano » Fri Jul 18, 2008 8:35 pm

Please try. :-)

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8718
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 85 guests