To Mr Nages : change bClrStd on line

To Mr Nages : change bClrStd on line

Postby Silvio » Wed May 18, 2011 7: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 ?
Last edited by Silvio on Wed May 18, 2011 8:40 pm, edited 1 time in total.
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: To Mr Nages : change bClrStd on line

Postby Silvio » Wed May 18, 2011 8:34 pm

SORRY i RESOLVED !!!!!
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: To Mr Nages : change bClrStd on line

Postby nageswaragunupudi » Thu May 19, 2011 5:08 am

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

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

Re: To Mr Nages : change bClrStd on line

Postby Silvio » Thu May 19, 2011 10:06 am

thanks
is it a new command ?
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: To Mr Nages : change bClrStd on line

Postby nageswaragunupudi » 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
User avatar
nageswaragunupudi
 
Posts: 10628
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: To Mr Nages : change bClrStd on line

Postby Silvio » Thu May 19, 2011 3: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
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: To Mr Nages : change bClrStd on line

Postby nageswaragunupudi » Thu May 19, 2011 4: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
User avatar
nageswaragunupudi
 
Posts: 10628
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: To Mr Nages : change bClrStd on line

Postby Manuel Aranda » Tue Jun 25, 2013 7: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
User avatar
Manuel Aranda
 
Posts: 604
Joined: Wed Oct 19, 2005 8:20 pm
Location: España

Re: To Mr Nages : change bClrStd on line

Postby Silvio.Falconi » 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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7053
Joined: Thu Oct 18, 2012 7:17 pm

Re: To Mr Nages : change bClrStd on line

Postby Manuel Aranda » Wed Jun 26, 2013 4: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
User avatar
Manuel Aranda
 
Posts: 604
Joined: Wed Oct 19, 2005 8:20 pm
Location: España

Re: To Mr Nages : change bClrStd on line

Postby ukoenig » Mon Apr 19, 2021 6:58 am

Hello

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

Image

Code: Select all  Expand view

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 :?:
Last edited by ukoenig on Thu Apr 22, 2021 9:32 am, edited 1 time in total.
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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: To Mr Nages : change bClrStd on line

Postby ukoenig » Mon Apr 19, 2021 10:23 am

I found a working solution
but maybe there is something better

Code: Select all  Expand view

...
...
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 :D
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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 92 guests