Page 1 of 1

To Mr Nages : change bClrStd on line

Posted: Wed May 18, 2011 7:19 pm
by Silvio
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 ?

Re: To Mr Nages : change bClrStd on line

Posted: Wed May 18, 2011 8:34 pm
by Silvio
SORRY i RESOLVED !!!!!

Re: To Mr Nages : change bClrStd on line

Posted: Thu May 19, 2011 5:08 am
by nageswaragunupudi
Instead of :
oBrowse:bClrStd := { || ..}
substitute
oBrowse:bClrStds := { || ... }

Re: To Mr Nages : change bClrStd on line

Posted: Thu May 19, 2011 10:06 am
by Silvio
thanks
is it a new command ?

Re: To Mr Nages : change bClrStd on line

Posted: Thu May 19, 2011 10:17 am
by nageswaragunupudi
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, .... }

Re: To Mr Nages : change bClrStd on line

Posted: Thu May 19, 2011 3:32 pm
by Silvio
Mr Rao,
I'm afraid I have an old xbrowse version because I not found bClrStds command on my source

Re: To Mr Nages : change bClrStd on line

Posted: Thu May 19, 2011 4:05 pm
by nageswaragunupudi
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

Re: To Mr Nages : change bClrStd on line

Posted: Tue Jun 25, 2013 7:51 pm
by Manuel Aranda
Hola Silvio, ¿resolviste este asunto? ¿Puedes decirme cómo? Gracias.

Re: To Mr Nages : change bClrStd on line

Posted: Wed Jun 26, 2013 10:28 am
by Silvio.Falconi
as Mr Nages wrote!!

Re: To Mr Nages : change bClrStd on line

Posted: Wed Jun 26, 2013 4:19 pm
by Manuel Aranda
Silvio, muchas gracias.