MODIFICACION EN LA XBROWSE PARA PINTARLO TIPO ZEBRA

MODIFICACION EN LA XBROWSE PARA PINTARLO TIPO ZEBRA

Postby rterraz » Fri Mar 04, 2016 10:28 am

Hola Amigos

Una pequeña contribucion, espero les guste
Para pintar el fondo del xbrowse tipo 'zebra' ( rows de colores alternados )
hacer lo siguiente

en la clase xbrowse.prg hacer estas modificaciones
en la DATA agregar esto:

lRefreshOnlyData,; // True when only the data should be painted (used internally)
l2007, ; // 2007 look
lZebra, ; // zebra
lFlatStyle ; // Flat Style
AS LOGICAL

En el METHOD ADJUST() del TXBROWSE
Agregar esto:

local nFor, nLen, nHeight, nStyle, nTemp, oCol, h

// asigno valor al bclrstd para pintar el zebra
// pueden usar los colores que mas les gusten

if ::lZebra <> NIL .AND. ::lZebra
::bClrStd := { || { CLR_BLACK, If( ::KeyNo() % 2 == 1, CLR_WHITE, CLR_CELESTE ) } }
endif


if ::nMarqueeStyle == MARQSTYLE_HIGHLWIN7
if ValType( Eval( ::bClrSelFocus )[ 2 ] ) != 'A'
::bClrSelFocus := { || { CLR_BLACK, { { 1, RGB( 220, 235, 252 ), ;
RGB( 193, 219, 252 ) } } } }
endif
if ValType( Eval( ::bClrSel )[ 2 ] ) != 'A'
::bClrSel := ::bClrSelFocus
endif
endif

para activarlo:

oBrw:lZebra := .T.

Saludos
User avatar
rterraz
 
Posts: 182
Joined: Wed Nov 08, 2006 11:44 pm
Location: Argentina

Re: MODIFICACION EN LA XBROWSE PARA PINTARLO TIPO ZEBRA

Postby Silvio.Falconi » Fri Mar 04, 2016 12:17 pm

Manuel avarez allready made this feature last year
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: 6716
Joined: Thu Oct 18, 2012 7:17 pm

Re: MODIFICACION EN LA XBROWSE PARA PINTARLO TIPO ZEBRA

Postby rterraz » Fri Mar 04, 2016 12:34 pm

bueno, llegue tarde
de todas maneras lo que abunda no daña
saludos
User avatar
rterraz
 
Posts: 182
Joined: Wed Nov 08, 2006 11:44 pm
Location: Argentina

Re: MODIFICACION EN LA XBROWSE PARA PINTARLO TIPO ZEBRA

Postby Silvio.Falconi » Fri Mar 04, 2016 12:56 pm

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: 6716
Joined: Thu Oct 18, 2012 7:17 pm

Re: MODIFICACION EN LA XBROWSE PARA PINTARLO TIPO ZEBRA

Postby Antonio Linares » Fri Mar 04, 2016 6:01 pm

Raul,

gracias
regards, saludos

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

Re: MODIFICACION EN LA XBROWSE PARA PINTARLO TIPO ZEBRA

Postby AIDA » Thu May 05, 2016 6:00 am

Gracias :D

Saluditos :wink:
Que es mejor que programar? creo que nada :)
Atropellada pero aqui ando :P

I love Fivewin

séʌǝɹ ןɐ ɐʇsǝ opunɯ ǝʇsǝ
User avatar
AIDA
 
Posts: 877
Joined: Fri Jan 12, 2007 8:35 pm

Re: MODIFICACION EN LA XBROWSE PARA PINTARLO TIPO ZEBRA

Postby sysctrl2 » Mon May 09, 2016 4:08 pm

Y la imagen ?
Cesar Cortes Cruz
SysCtrl Software
Mexico

' Sin +- FWH es mejor "
User avatar
sysctrl2
 
Posts: 949
Joined: Mon Feb 05, 2007 7:15 pm

Re: MODIFICACION EN LA XBROWSE PARA PINTARLO TIPO ZEBRA

Postby nageswaragunupudi » Fri May 13, 2016 4:35 pm

en la clase xbrowse.prg hacer estas modificaciones
en la DATA agregar esto:

This is for information.

If you want to add a new DATA to XBrowse, it is not necessary to modify xbrowse.prg. It is not even necessary to have a derived class.

After defining xBrowe,

oBrw:AddVar( "LZEBRA", .t. )

Now we can use oBrw:lZebra like any other DATA
Regards

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


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 17 guests