FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour To Mr Nages : change bClrStd on line
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
To Mr Nages : change bClrStd on line
Posted: Wed May 18, 2011 07:19 PM

can I change the status of :bClrStd on line and refresh the browse ?

I made :

@ 170, 5 CHECKBOX lpijama Prompt "Pijama effect" SIZE 80, 10 PIXEL OF oDlg ;
ON CHANGE;
( IIF( lpijama ,oBrowse:bClrStd := { || { CLR_BLACK, If(oBrowse:KeyNo % 2 == 0, RGB(193,221,255), RGB(221,245,255) ) } } ,;
oBrowse:bClrStd := {|| { CLR_BLACK, GetSysColor( COLOR_WINDOW )} }),;
oBrowse:refresh())

but when I clickthe checkbox it not change , I must close the oBrowse and reopen it ( I saved the config to an ini file)

I can change the line vertical and horizontal, put also the RecordSelector on line but Inot Know how show the pijama effect on line ....

Can help me please ?

Best Regards, Saludos



Falconi Silvio
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
Re: To Mr Nages : change bClrStd on line
Posted: Wed May 18, 2011 08:34 PM

SORRY i RESOLVED !!!!!

Best Regards, Saludos



Falconi Silvio
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: To Mr Nages : change bClrStd on line
Posted: Thu May 19, 2011 05:08 AM

Instead of :
oBrowse:bClrStd := { || ..}
substitute
oBrowse:bClrStds := { || ... }

Regards



G. N. Rao.

Hyderabad, India
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
Re: To Mr Nages : change bClrStd on line
Posted: Thu May 19, 2011 10:06 AM

thanks
is it a new command ?

Best Regards, Saludos



Falconi Silvio
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: To Mr Nages : change bClrStd on line
Posted: Thu May 19, 2011 10:17 AM

oBrw:bClrStds := <bBlock>
is a shortcut for
AEval( oBrw:aCols { |o| o:bClrStd := <bBlock> } )

Generic form is

oBrw:<anyColumnData>S := <u> // see the last "s" which indicates plural number
is a shortcut for
AEval( oBrw:aCols, { |o| o:<anyColumnData> := <u> } )

Also

oBrw:<anyColumnData>s := <aData>
will assign elements of aData to each column of oBrw:<anyColumnData> in the order of the columns' creation orders.

Also
aValues := oBrw:<anyColumnData>s
returns an array of the data of each column.

Examples:

aWidths := oBrw:nWidths // { 30, 40, 50, .... }

Regards



G. N. Rao.

Hyderabad, India
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
Re: To Mr Nages : change bClrStd on line
Posted: Thu May 19, 2011 03:32 PM

Mr Rao,
I'm afraid I have an old xbrowse version because I not found bClrStds command on my source

Best Regards, Saludos



Falconi Silvio
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: To Mr Nages : change bClrStd on line
Posted: Thu May 19, 2011 04:05 PM
This works from 10.8 onwards.
You will not find any data like bClrStds or nWidths in the class. But xbrowse interprets this inside its logic.

Here is whatsnew.txt for 10.8

* xbrowse: Improvement: It is now possible to assign data of all columns in one single statement.
Example: oBrw:nHeadStrAligns := AL_CENTER is equivalent to AEval( oBrw:aCols, { |oCol| oCol:nHeadStrAlign := AL_CENTER } ).

If an array of values is assigned, the elements are successively assigned to the column objects.

Example: oBrw:cHeaders := { 'ONE', 'TWO', 'THREE' }, assigns the headers to three columns. The assignment is made
in the order of original creation of the columns, even if the columns are rearranged by the user.
Accessing column data returns an array of values.

Example: aHeaders := oBrw:cHeaders
Regards



G. N. Rao.

Hyderabad, India
Posts: 610
Joined: Wed Oct 19, 2005 08:20 PM
Re: To Mr Nages : change bClrStd on line
Posted: Tue Jun 25, 2013 07:51 PM

Hola Silvio, ¿resolviste este asunto? ¿Puedes decirme cómo? Gracias.

Un saludo,

Manuel



xH 1.2.3, FWH 23.07 32 bits, BC++ 7.4, xVerce CW 1.0, PellesC
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: To Mr Nages : change bClrStd on line
Posted: Wed Jun 26, 2013 10:28 AM

as Mr Nages wrote!!

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 610
Joined: Wed Oct 19, 2005 08:20 PM
Re: To Mr Nages : change bClrStd on line
Posted: Wed Jun 26, 2013 04:19 PM

Silvio, muchas gracias.

Un saludo,

Manuel



xH 1.2.3, FWH 23.07 32 bits, BC++ 7.4, xVerce CW 1.0, PellesC
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: To Mr Nages : change bClrStd on line
Posted: Mon Apr 19, 2021 06:58 AM
Hello

is it possible to change the list / array < aTextCol > to < AEval syntax > :-)



Code (fw): Select all Collapse
oBrw1:bPainted  := < |hDC|  
     oBrw1:aCols[ 1 ]:bClrStd       := { || { aTextCol[ 1 ], CLR_BLACK } } 
     oBrw1:aCols[ 2 ]:bClrStd       := { || { aTextCol[ 2 ], CLR_BLACK } } 
     oBrw1:aCols[ 3 ]:bClrStd       := { || { aTextCol[ 3 ], CLR_BLACK } } 
     oBrw1:aCols[ 4 ]:bClrStd       := { || { aTextCol[ 4 ], CLR_BLACK } } 
     oBrw1:aCols[ 5 ]:bClrStd       := { || { aTextCol[ 5 ], CLR_BLACK } } 
     oBrw1:aCols[ 6 ]:bClrStd       := { || { aTextCol[ 6 ], CLR_BLACK } } 
     oBrw1:aCols[ 7 ]:bClrStd       := { || { aTextCol[ 7 ], CLR_BLACK } } 
     oBrw1:aCols[ 8 ]:bClrStd       := { || { aTextCol[ 8 ], CLR_BLACK } } 
     oBrw1:aCols[ 9 ]:bClrStd       := { || { aTextCol[ 9 ], CLR_BLACK } } 
     oBrw1:aCols[ 10 ]:bClrStd       := { || { aTextCol[ 10 ], CLR_BLACK } } 
     oBrw1:aCols[ 11 ]:bClrStd       := { || { aTextCol[ 11 ], CLR_BLACK } } 
RETURN NIL
>


I would like to include the colorarray < aTextCol > in
AEval( oBrw1:aCols, { | o | o:bClrStd := { || { aTextCol[ :-) ], CLR_BLACK } } } )
instead using the listed array
a column-counter is missing
adding any column-number it works

regards
Uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: To Mr Nages : change bClrStd on line
Posted: Mon Apr 19, 2021 10:23 AM
I found a working solution
but maybe there is something better

Code (fw): Select all Collapse
...
...
oBrw1:bPainted  := < |hDC|  
        I := 1 // column-counter
        AEval( oBrw1:aCols, { | o | o:bClrStd := CLRSTDBLOCK( I++, o ) } )
RETURN NIL
>
...
...

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

FUNCTION CLRSTDBLOCK( I, oCol )
IF I > 11 // columns
    I := 1
ENDIF
RETURN { || { aTextCol[ I ], CLR_BLACK  } } // textcolor from array


regards
Uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.

Continue the discussion