No aparece Efecto Pijama (Solucionado)

No aparece Efecto Pijama (Solucionado)

Postby Compuin » Thu Jan 20, 2011 8:08 pm

Buenas tardes amigos,

Al tratar de crear efecto pijama en un txbrowse, solo aparece en azul (la intencion es azul oscuro y azul claro, alternativamente). Aca dejo el codigo para que me apoyen:

#include 'fivewin.ch'
#include 'xbrowse.ch'

function Main()
LOCAL oDlg, oBrw, oFont
LOCAL aCol := ARRAY(2)

USE clientes
GO TOP

DEFINE DIALOG oDlg SIZE 440,240 PIXEL ;
TITLE 'XBrowse con TXBrowse'

oBrw := TXBrowse():New( oDlg )

WITH OBJECT oBrw
:nTop := 10
:nLeft := 2
:nBottom := 110 // 240/2 - 10
:nRight := 210 // 440/2 - 10

:nMarqueeStyle := MARQSTYLE_HIGHLROW // Con cursor de todo el renglón
:lColDividerComplete := (.F.) // (.T.) Mantiene siempre llena la pantalla
:lTransparent := .F.
:nHeaderHeight := 20 // Altura de los encabezados
:nRowHeight := 20 // Altura del renglón
:nHeaderLines := 1 // Número de líneas de encabezados
:nDataLines := 1 // Número de líneas de detalle
:nFooterHeight := 0 // Altura del footer
:nFooterLines := 1 // Número de líneas en el footer
:lFooter := (.F.) // (.T.) Sí queremos línea de footer
:lHScroll := (.T.) // Quitamos el scroll horizontal
//Aqui el Efecto Pijama
:bClrStd := { || If( oBrw:nArrayAt % 2 == 0, { CLR_BLACK, RGB( 224, 236, 255 ) }, { CLR_BLACK, RGB( 189, 211, 253 ) } ) }
END

oBrw:CreateFromCode()

ACTIVATE DIALOG oDlg CENTERED ;
ON INIT ( oBrw:SetFocus(), .f. )

CLOSE clientes
return nil
Last edited by Compuin on Sat Jan 22, 2011 4:43 pm, edited 2 times in total.
FWH 20.12
Hbmk2 32/64 Bits (Build 19.29.30133)
Microsoft Visual C 32 Bits
MySql 8.0.24 32/64 Bits
VS Code
Compuin
 
Posts: 1214
Joined: Tue Dec 28, 2010 1:29 pm
Location: Quebec, Canada

Re: No aparece Efecto Pijama

Postby Bayron » Thu Jan 20, 2011 10:45 pm

Utiliza:


Code: Select all  Expand view
:bClrStd    := { || If( oBrw:KeyNo() % 2 == 0, ;
               { CLR_BLACK, RGB( 224, 236, 255 ) }, ;
               { CLR_BLACK, RGB( 189, 211, 253 ) } ) }
 



PS: Puedes ver otros efectos en: \FWH\Samples\mallorca.prg
=====>

Bayron Landaverry
(215)2226600 Philadelphia,PA, USA
+(502)46727275 Guatemala
MayaBuilders@gMail.com

FWH12.04||Harbour 3.2.0 (18754)||BCC6.5||UEstudio 10.10||
Windows 7 Ultimate

FiveWin, One line of code and it's done...
User avatar
Bayron
 
Posts: 815
Joined: Thu Dec 24, 2009 12:46 am
Location: Philadelphia, PA

Re: No aparece Efecto Pijama

Postby Compuin » Fri Jan 21, 2011 1:26 pm

Me aparece en una ventana lo siguiente una vez hecho el cambio sugerido por Byron

ERROR BASE/1004 Message not found: TXBROWSE:KEYNO from Errorsys, line: 179,

El browser no se ejecuta, solo aceptar para abortar
FWH 20.12
Hbmk2 32/64 Bits (Build 19.29.30133)
Microsoft Visual C 32 Bits
MySql 8.0.24 32/64 Bits
VS Code
Compuin
 
Posts: 1214
Joined: Tue Dec 28, 2010 1:29 pm
Location: Quebec, Canada

Re: No aparece Efecto Pijama

Postby Manuel Aranda » Fri Jan 21, 2011 6:58 pm

Prueba esto:
Code: Select all  Expand view

oBrw:nClrPane:={|| IIF(DATOS->(OrdKeyNo())%2==0,CLR_LGREEN,CLR_LGRAY)}
 
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: No aparece Efecto Pijama

Postby Compuin » Fri Jan 21, 2011 7:21 pm

Manuel,

No hizo ningun efecto. Sigue sin aparecer la pijama :?
FWH 20.12
Hbmk2 32/64 Bits (Build 19.29.30133)
Microsoft Visual C 32 Bits
MySql 8.0.24 32/64 Bits
VS Code
Compuin
 
Posts: 1214
Joined: Tue Dec 28, 2010 1:29 pm
Location: Quebec, Canada

Re: No aparece Efecto Pijama

Postby Lautaro » Fri Jan 21, 2011 7:25 pm

Compuin,

¿ Tienes algún indice abierto ?, si no no va a funcionar.

Atte.,

Lautaro Moreira
User avatar
Lautaro
 
Posts: 322
Joined: Fri Oct 07, 2005 2:44 pm
Location: Osorno, Chile

Re: No aparece Efecto Pijama

Postby Compuin » Fri Jan 21, 2011 7:44 pm

Ningun indice,

Tal como esta en el codigo al comienzo del post.
FWH 20.12
Hbmk2 32/64 Bits (Build 19.29.30133)
Microsoft Visual C 32 Bits
MySql 8.0.24 32/64 Bits
VS Code
Compuin
 
Posts: 1214
Joined: Tue Dec 28, 2010 1:29 pm
Location: Quebec, Canada

Re: No aparece Efecto Pijama

Postby Lautaro » Fri Jan 21, 2011 7:47 pm

Hola,

Entonces prueba esto :
Code: Select all  Expand view

oBrw:nClrPane:={|| IIF(DATOS->(recno())%2==0,CLR_LGREEN,CLR_LGRAY)}
 


Atte.,

Lautaro Moreira
User avatar
Lautaro
 
Posts: 322
Joined: Fri Oct 07, 2005 2:44 pm
Location: Osorno, Chile

Re: No aparece Efecto Pijama

Postby Compuin » Fri Jan 21, 2011 7:52 pm

No hubo efecto tampoco.

Que estoy haciendo errado?
FWH 20.12
Hbmk2 32/64 Bits (Build 19.29.30133)
Microsoft Visual C 32 Bits
MySql 8.0.24 32/64 Bits
VS Code
Compuin
 
Posts: 1214
Joined: Tue Dec 28, 2010 1:29 pm
Location: Quebec, Canada

Re: No aparece Efecto Pijama

Postby Bayron » Sat Jan 22, 2011 3:17 am

Compuin wrote:Me aparece en una ventana lo siguiente una vez hecho el cambio sugerido por Byron

ERROR BASE/1004 Message not found: TXBROWSE:KEYNO from Errorsys, line: 179,

El browser no se ejecuta, solo aceptar para abortar


Verifica:

Que tengas incluida RDD.LIB de (x)harbour...
Que la base de datos no este vacia...


Este es el codigo que produce el efecto pijama, aplicando el codigo que tu incluiste....

Aqui un ejemplo compilado...
http://www.mayapos.com/FiveWin/pijama.zip
=====>

Bayron Landaverry
(215)2226600 Philadelphia,PA, USA
+(502)46727275 Guatemala
MayaBuilders@gMail.com

FWH12.04||Harbour 3.2.0 (18754)||BCC6.5||UEstudio 10.10||
Windows 7 Ultimate

FiveWin, One line of code and it's done...
User avatar
Bayron
 
Posts: 815
Joined: Thu Dec 24, 2009 12:46 am
Location: Philadelphia, PA

Re: No aparece Efecto Pijama

Postby Compuin » Sat Jan 22, 2011 3:26 pm

Amigo Bayron,

Hice lo que sugeristes, compile y el resultado es esta imagen que anexo


Image

Sera por la version de FWH que uso? es la FWH 6.12
FWH 20.12
Hbmk2 32/64 Bits (Build 19.29.30133)
Microsoft Visual C 32 Bits
MySql 8.0.24 32/64 Bits
VS Code
Compuin
 
Posts: 1214
Joined: Tue Dec 28, 2010 1:29 pm
Location: Quebec, Canada

Re: No aparece Efecto Pijama

Postby nageswaragunupudi » Sat Jan 22, 2011 4:16 pm

The SETGET Method KeyNo was not implemented in the older versions like 6.12. Instead of oBrw:KeyNo, we may use Eval( oBrw:bKeyNo,,oBrw ) for older versions of XBrowse.

Using OrdKeyNo() works only for RDDs. Not useful while browsing arrays, recordsets, etc.
Using RecNo() works only for RDDs browsing in natural order, without setting to any index.

Using Eval( oBrw:bKeyNo,,oBrw ) works for Browsing all kinds of datasources.
Regards

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

Re: No aparece Efecto Pijama (Solucionado)

Postby Compuin » Sat Jan 22, 2011 4:42 pm

It's works!

Ahora si funciona. Muchas gracias
FWH 20.12
Hbmk2 32/64 Bits (Build 19.29.30133)
Microsoft Visual C 32 Bits
MySql 8.0.24 32/64 Bits
VS Code
Compuin
 
Posts: 1214
Joined: Tue Dec 28, 2010 1:29 pm
Location: Quebec, Canada

Re: No aparece Efecto Pijama

Postby Bayron » Sat Jan 22, 2011 5:00 pm

Thanks Mr. RAO,

I will use this way instead for compatibility...

It worked in FWH10.2
=====>

Bayron Landaverry
(215)2226600 Philadelphia,PA, USA
+(502)46727275 Guatemala
MayaBuilders@gMail.com

FWH12.04||Harbour 3.2.0 (18754)||BCC6.5||UEstudio 10.10||
Windows 7 Ultimate

FiveWin, One line of code and it's done...
User avatar
Bayron
 
Posts: 815
Joined: Thu Dec 24, 2009 12:46 am
Location: Philadelphia, PA

Re: No aparece Efecto Pijama

Postby nageswaragunupudi » Sat Jan 22, 2011 6:31 pm

Bayron wrote:Thanks Mr. RAO,

I will use this way instead for compatibility...

It worked in FWH10.2


My advice to all users of recent versions is to use oBrw:KeyNo.
Regards

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


Return to FiveWin para Harbour/xHarbour

Who is online

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