TO GURUS : TRANSPARENT ERROR WITH XBROWSE

Re: TO GURUS : TRANSPARENT ERROR WITH XBROWSE

Postby ukoenig » Sat Jan 24, 2009 7:58 pm

Hello Silvio,

for a row-color-change with a function, You can use instead of < oBrw:bClrStd > the function :
ROW_COLORS( oBrw, nTCOLOR, nCOLOR1, nCOLOR2 )
It uses < oBrw:KeyNo > for the row-color-change not < ordKeyno() >.
It doesn' matter, if You use arrays or databases.
I don't know why, but the shown BMP's are all visible with this solution.

I don't know, if You still want to do something special, or just a row-color-change.
Just let me know.

Code: Select all  Expand view

....
ROW_COLORS( oBrw, CLR_BLACK, RGB(193,221,255), RGB(221,245,255))
....

FUNCTION  ROW_COLORS( oBrw, nTCOLOR, nCOLOR1, nCOLOR2 )
Local aClrCol := {}

// nTCOLOR = TextColor
// nCOLOR1 = 1. Color
// nCOLOR2 = 2. Color

aClrCol := { { nTCOLOR, nCOLOR1 }, { nTCOLOR, nCOLOR2 } }
oBrw:bClrStd := { || aClrCol[ oBrw:KeyNo % 2 + 1 ] }

RETURN( NIL )



Regards
Uwe :lol:
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 GURUS : TRANSPARENT ERROR WITH XBROWSE

Postby Daniel Garcia-Gil » Sat Jan 24, 2009 10:10 pm

i dont understand you problem...
all bitmap paint correctly

1 have only 1 problem...
i cant use multiselect with brush and bmp
i can use other case with or without brush, mono or multi color row - col

i have idea with brush multiselect and bmp
Code: Select all  Expand view
#include "FiveWin.ch"
#include "xbrowse.ch"

function main()

local oWnd1
local aBrw      := array( 4 )
local aArray1 := {}
local nI
local oBrush
local oBrush2

define brush oBrush color GetSysColor( 13 )
define brush oBrush2 color GetSysColor( 5 )


for nI = 1 to 20
aadd( aArray1, { .f.,SPACE(20),;
                        "Row:"+StrZero(nI,2)+" Col:02",;
                        "Row:"+StrZero(nI,2)+" Col:03" } )
next


DEFINE window oWnd1 Title "Test Brush xBrowse"

aBrw[ 1 ]:= txbrowse():new( oWnd1 )
aBrw[ 1 ]:nRowHeight := 40
aBrw[ 1 ]:nColDividerStyle    := LINESTYLE_BLACK
aBrw[ 1 ]:nRowDividerStyle    := LINESTYLE_BLACK
aBrw[ 1 ]:SetArray( aArray1 )
aBrw[ 1 ]:nMarqueeStyle := 5
aBrw[ 1 ]:SetBackGround( "agua2.bmp" )
aBrw[ 1 ]:CreateFromCode()


aBrw[ 1 ]:aCols[ 2 ]:addbmpfile("print.bmp")
aBrw[ 1 ]:aCols[ 2 ]:addbmpfile("yes.bmp")
aBrw[ 1 ]:aCols[ 2 ]:bBmpData := {|| if( aBrw[ 1 ]:nArrayAt() % 2 == 0, 1, 2 ) }

aBrw[ 1 ]:aCols[ 3 ]:addbmpfile("gobottom.bmp")
aBrw[ 1 ]:aCols[ 3 ]:addbmpfile("gotop.bmp")
aBrw[ 1 ]:aCols[ 3 ]:bBmpData := {|| if( aBrw[ 1 ]:nArrayAt() % 2 == 0, 1, 2 ) }


aBrw[ 1 ]:aCols[ 1 ]:cHeader = "Selection"
aBrw[ 1 ]:aCols[ 1 ]:SetCheck( {"on.bmp","off.bmp"}, {|o,u| o:Value( u ) } )
aBrw[ 1 ]:aCols[ 1 ]:bStrData := {|| NIL }
//aBrw[ 1 ]:aCols[ 1 ]:lBmpTransparent := .f.

// comment this line for each case
for nI = 1 to 4
      aBrw[ 1 ]:aCols[ nI ]:oBrush := {|| if ( aBrw[1]:aRow[ 1 ], oBrush,  ) }//CreaBrush( aBrw[ 1 ], aBrw[ 1 ]:nArrayAt(),oBrush, oBrush2 )
//      aBrw[ 1 ]:aCols[ nI ]:bClrStd := {|| if ( aBrw[ 1 ]:nArrayAt() %2 == 0,;
//                                                            { CLR_BLACK,RGB( 193,221,255 ) },;
//                                                            { CLR_BLACK,RGB( 221,245,255 ) } ) }
next


oWnd1:oClient = aBrw[ 1 ]

ACTIVATE window oWnd1

return nil

Image

without brush row mono color

Code: Select all  Expand view
#include "FiveWin.ch"
#include "xbrowse.ch"

function main()

local oWnd1
local aBrw      := array( 4 )
local aArray1 := {}
local nI
local oBrush
local oBrush2

define brush oBrush color GetSysColor( 13 )
define brush oBrush2 color GetSysColor( 5 )


for nI = 1 to 20
aadd( aArray1, { .f.,SPACE(20),;
                        "Row:"+StrZero(nI,2)+" Col:02",;
                        "Row:"+StrZero(nI,2)+" Col:03" } )
next


DEFINE window oWnd1 Title "Test Brush xBrowse"

aBrw[ 1 ]:= txbrowse():new( oWnd1 )
aBrw[ 1 ]:nRowHeight := 40
aBrw[ 1 ]:nColDividerStyle    := LINESTYLE_BLACK
aBrw[ 1 ]:nRowDividerStyle    := LINESTYLE_BLACK
aBrw[ 1 ]:SetArray( aArray1 )
aBrw[ 1 ]:nMarqueeStyle := 5
//aBrw[ 1 ]:SetBackGround( "agua2.bmp" )
aBrw[ 1 ]:CreateFromCode()


aBrw[ 1 ]:aCols[ 2 ]:addbmpfile("print.bmp")
aBrw[ 1 ]:aCols[ 2 ]:addbmpfile("yes.bmp")
aBrw[ 1 ]:aCols[ 2 ]:bBmpData := {|| if( aBrw[ 1 ]:nArrayAt() % 2 == 0, 1, 2 ) }

aBrw[ 1 ]:aCols[ 3 ]:addbmpfile("gobottom.bmp")
aBrw[ 1 ]:aCols[ 3 ]:addbmpfile("gotop.bmp")
aBrw[ 1 ]:aCols[ 3 ]:bBmpData := {|| if( aBrw[ 1 ]:nArrayAt() % 2 == 0, 1, 2 ) }


aBrw[ 1 ]:aCols[ 1 ]:cHeader = "Selection"
aBrw[ 1 ]:aCols[ 1 ]:SetCheck( {"on.bmp","off.bmp"}, {|o,u| o:Value( u ) } )
aBrw[ 1 ]:aCols[ 1 ]:bStrData := {|| NIL }
aBrw[ 1 ]:aCols[ 1 ]:lBmpTransparent := .f.

// comment this line for each case
for nI = 1 to 4
//      aBrw[ 1 ]:aCols[ nI ]:oBrush := {|| if ( aBrw[1]:aRow[ 1 ], oBrush,  ) }
//      aBrw[ 1 ]:aCols[ nI ]:bClrStd := {|| if ( aBrw[ 1 ]:nArrayAt() %2 == 0,;
//                                                            { CLR_BLACK,RGB( 193,221,255 ) },;
//                                                            { CLR_BLACK,RGB( 221,245,255 ) } ) }
aBrw[ 1 ]:aCols[ nI ]:bClrStd := {|| { CLR_BLACK,RGB( 193,221,255 ) } }

next


oWnd1:oClient = aBrw[ 1 ]

ACTIVATE window oWnd1

return nil


Image

with multicolor row same result
User avatar
Daniel Garcia-Gil
 
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita

Re: TO GURUS : TRANSPARENT ERROR WITH XBROWSE

Postby Silvio » Sun Jan 25, 2009 1:42 am

Daniel,
I try with your sample but I must insert it on my application

Uwe ,
I ask you How to converte your idea into my function colores(cdbf)
I have all xbrowse with this system and I cannot change all applications

thanks in advance
Best Regards, Saludos

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

Re: TO GURUS : TRANSPARENT ERROR WITH XBROWSE

Postby Silvio » Mon Jan 26, 2009 11:05 am

Daniel ,
have you foud a solution ?
Best Regards, Saludos

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

Re: TO GURUS : TRANSPARENT ERROR WITH XBROWSE

Postby ukoenig » Mon Jan 26, 2009 12:16 pm

Hello Daniel,

all my tests are working now.
The problem with the 1. browser-line ( selected row ) is solved.
The reason : maybe one line to much inside a function, and You get unexpected results.
It has to be a designated scheme.

Image

After all my other tests are finished, I will put the solutions of all possible combinations
in this post.

Thank You

Best Regards
Uwe :lol:
Last edited by ukoenig on Mon Jan 26, 2009 12:33 pm, 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 GURUS : TRANSPARENT ERROR WITH XBROWSE

Postby Silvio » Mon Jan 26, 2009 12:30 pm

can you make an sample as my function ?
thanks
Best Regards, Saludos

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

Re: TO GURUS : TRANSPARENT ERROR WITH XBROWSE

Postby Daniel Garcia-Gil » Mon Jan 26, 2009 1:24 pm

Dear Uwe,
How I can modify it ( as your working sample) ?

I make :

oApp():oGrid:bClrStd := { || Colores(oDCli) }

...
STATIC FUNCTION Colores(cdbf)
LOCAL aColo:={}
IF (cdbf)->(Ordkeyno()) % 2 == 0
aColo:={CLR_BLACK, RGB(193,221,255) }
ELSE
aColo:={CLR_BLACK, RGB(221,245,255) }
ENDIF
RETURN (aColo)


thanks


Silvio...
what is you problem...?
do you cant see pijama effect ( Alternated Row-Color ) ?
User avatar
Daniel Garcia-Gil
 
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita

Re: TO GURUS : TRANSPARENT ERROR WITH XBROWSE

Postby Silvio » Mon Jan 26, 2009 4:32 pm

I not Know what not run
I see a blue band and I not see the bitmaps
see my oldest message with picture
thanks

I have this code
Code: Select all  Expand view
oApp():oDlg:NewGrid( nSplit )
oApp():oGrid:nMarqueeStyle       := MARQSTYLE_HIGHLROWMS    // per la multi selezione
oApp():oGrid:nColDividerStyle    := LINESTYLE_FORECOLOR
oApp():oGrid:lColDividerComplete := .t.
oApp():oGrid:lRecordSelector := .F.

and one column :

                                         oCol:= oApp():oGrid:AddCol()
                                          oCol:AddResource("sort1")
                                          oCol:AddResource("sort2")
                                          oCol:cHeader  := "Grado"
                                          oCol:nHeadBmpNo    := if( (oDCli)->( ORDNUMBER() ) == 7, 1, 2)
                                          oCol:nHeadBmpAlign := AL_RIGHT
                                          oCol:bLClickHeader :={ ||(Sel_Index(6,oDCli) , oApp():oTab:nOption:=6,oApp():oTab:refresh()) }
                                          oCol:AddResource("GRADO1")
                                          oCol:AddResource("GRADO2")
                                          oCol:AddResource("GRADO3")
                                          oCol:AddResource("GRADO4")
                                          oCol:AddResource("GRADO5")
                                          oCol:AddResource("GRADO6")
                                          oCol:AddResource("GRADO7")
                                          oCol:AddResource("GRADO8")
                                          oCol:AddResource("GRADO0")
                                          oCol:bStrData := { || (oDCli)->GRADO}
                                          oCol:bBmpData := { || (oDCli)->GRADO + 2}
                                          oCol:nWidth   :=40






and then at the end


oApp():oGrid:nFreeze :=3
oApp():oGrid:SetRDD()
oApp():oGrid:bClrStd := { || Colores(oDCli) }
oApp():oGrid:SetBackGround( ".\bitmaps\pclogog.BMP" )
oApp():oGrid:CreateFromCode()
oApp():oGrid:bChange    :={ || (RefreshCont(oCont,oDCli)) }
oApp():oGrid:bRClicked := {|nRow,nCol| Disp_Men(oApp():oDlg,nRow,nCol,oDCli) }
oApp():oGrid:bKeyDown   :={|nKey| Val_nKey(nKey,oApp():oDlg)}
oApp():oGrid:bSeek      :={|c| DbSeek( Upper( c ) ) }
oApp():oGrid:nRowHeight  :=40
oApp():oGrid:nHeaderHeight  := 36
oApp():oGrid:RestoreState( cState )


.......

STATIC FUNCTION Colores(cdbf)
LOCAL aCol:={}
IF  (cdbf)->(Ordkeyno()) % 2 == 0
aCol:={CLR_BLACK, RGB(193,221,255) }
ELSE
aCol:={CLR_BLACK, RGB(221,245,255) }
ENDIF
RETURN (aCol)




HOw I must change it ?
Best Regards, Saludos

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

Re: TO GURUS : TRANSPARENT ERROR WITH XBROWSE

Postby Daniel Garcia-Gil » Mon Jan 26, 2009 6:14 pm

Silvio....
the problem is wen I use this command
oApp():oGrid:nMarqueeStyle := MARQSTYLE_HIGHLROWMS
I need it for the multiselection and to browse all data


yes is a problem

Daniel...
1 have only 1 problem...
i cant use multiselect with brush and bmp
i can use other case with or without brush, mono or multi color row - col
i have idea with brush multiselect and bmp

Select all
#include "FiveWin.ch"
#include "xbrowse.ch"

function main()

local oWnd1
local aBrw := array( 4 )
local aArray1 := {}
local nI
local oBrush
local oBrush2

define brush oBrush color GetSysColor( 13 )
define brush oBrush2 color GetSysColor( 5 )


for nI = 1 to 20
aadd( aArray1, { .f.,SPACE(20),;
"Row:"+StrZero(nI,2)+" Col:02",;
"Row:"+StrZero(nI,2)+" Col:03" } )
next


DEFINE window oWnd1 Title "Test Brush xBrowse"

aBrw[ 1 ]:= txbrowse():new( oWnd1 )
aBrw[ 1 ]:nRowHeight := 40
aBrw[ 1 ]:nColDividerStyle := LINESTYLE_BLACK
aBrw[ 1 ]:nRowDividerStyle := LINESTYLE_BLACK
aBrw[ 1 ]:SetArray( aArray1 )
aBrw[ 1 ]:nMarqueeStyle := 5
aBrw[ 1 ]:SetBackGround( "agua2.bmp" )
aBrw[ 1 ]:CreateFromCode()


aBrw[ 1 ]:aCols[ 2 ]:addbmpfile("print.bmp")
aBrw[ 1 ]:aCols[ 2 ]:addbmpfile("yes.bmp")
aBrw[ 1 ]:aCols[ 2 ]:bBmpData := {|| if( aBrw[ 1 ]:nArrayAt() % 2 == 0, 1, 2 ) }

aBrw[ 1 ]:aCols[ 3 ]:addbmpfile("gobottom.bmp")
aBrw[ 1 ]:aCols[ 3 ]:addbmpfile("gotop.bmp")
aBrw[ 1 ]:aCols[ 3 ]:bBmpData := {|| if( aBrw[ 1 ]:nArrayAt() % 2 == 0, 1, 2 ) }


aBrw[ 1 ]:aCols[ 1 ]:cHeader = "Selection"
aBrw[ 1 ]:aCols[ 1 ]:SetCheck( {"on.bmp","off.bmp"}, {|o,u| o:Value( u ) } )
aBrw[ 1 ]:aCols[ 1 ]:bStrData := {|| NIL }
//aBrw[ 1 ]:aCols[ 1 ]:lBmpTransparent := .f.

// comment this line for each case
for nI = 1 to 4
aBrw[ 1 ]:aCols[ nI ]:oBrush := {|| if ( aBrw[1]:aRow[ 1 ], oBrush, ) }//CreaBrush( aBrw[ 1 ], aBrw[ 1 ]:nArrayAt(),oBrush, oBrush2 )
// aBrw[ 1 ]:aCols[ nI ]:bClrStd := {|| if ( aBrw[ 1 ]:nArrayAt() %2 == 0,;
// { CLR_BLACK,RGB( 193,221,255 ) },;
// { CLR_BLACK,RGB( 221,245,255 ) } ) }
next


oWnd1:oClient = aBrw[ 1 ]

ACTIVATE window oWnd1

return nil

Image
User avatar
Daniel Garcia-Gil
 
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita

Re: TO GURUS : TRANSPARENT ERROR WITH XBROWSE

Postby Silvio » Mon Jan 26, 2009 6:21 pm

ok but when I insert your ideas on my source it not run good...
perhaps I not explain U or U not understand me ...
Best Regards, Saludos

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

Re: TO GURUS : TRANSPARENT ERROR WITH XBROWSE

Postby Antonio Linares » Mon Jan 26, 2009 7:21 pm

Silvio,

Latest xbrowse.prg (you have it) includes Daniel's enhancements.

Please try your tests again with the new xbrowse.prg
regards, saludos

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

Re: TO GURUS : TRANSPARENT ERROR WITH XBROWSE

Postby Silvio » Tue Jan 27, 2009 11:00 am

Sorry Antonio
I see also the blu bar and I cannot see bitmap on a row
Image


My sample code :
Code: Select all  Expand view

   oApp():oDlg:NewGrid( nSplit ) //---> it create a txbrowse simply
   oApp():oGrid:nColDividerStyle    := LINESTYLE_BLACK
   oApp():oGrid:nRowDividerStyle    := LINESTYLE_FORECOLOR
   oApp():oGrid:nMarqueeStyle       := MARQSTYLE_HIGHLROWMS
oApp():oGrid:lColDividerComplete := .T.
   oApp():oGrid:lRecordSelector := .F.



    oCol:= oApp():oGrid:AddCol()
    oCol:AddResource("sort1")
    oCol:AddResource("sort2")
    oCol:bStrData := { ||  (oDCli)->NUMCLI}
    oCol:cHeader  := "Codice"
    oCol:nWidth   := 80
    oCol:nHeadBmpNo    := 1
    oCol:nHeadBmpAlign := AL_RIGHT
    oCol:bLClickHeader :={ ||(Sel_Index(1,oDCli), oApp():oTab:nOption:=1,oApp():oTab:refresh())  }


   //PER LA SELEZIONE

    oCol:= oApp():oGrid:AddCol()
    oCol:AddResource("C_Pal")
    oCol:AddResource("STATO3")
    oCol:bBmpData  := { || Ds_Mar(1,2)}
    oCol:cHeader  := ""
    oCol:nWidth   := 25




     oCol:= oApp():oGrid:AddCol()
     oCol:AddResource("sort1")
     oCol:AddResource("sort2")
     oCol:bStrData := { ||  (oDCli)->NOMEINTERO}
     oCol:cHeader  := "Cognome Nome"
     oCol:nWidth   := 250
     oCol:nHeadBmpNo    := 2
     oCol:nHeadBmpAlign := AL_RIGHT
     oCol:bLClickHeader :={ ||(Sel_Index(2,oDCli), oApp():oTab:nOption:=2,oApp():oTab:refresh())  }


     oCol:= oApp():oGrid:AddCol()
                                         oCol:AddResource("sort1")
                                         oCol:AddResource("sort2")
                                         oCol:AddResource("UOMO")
                                         oCol:AddResource("DONNA")
                                       *   oCol:bStrData := { ||   (oDCli)->SESSO}
                                           oCol:bBmpData   := { || IF( ALLTRIM(UPPER("UOMO")) $ ALLTRIM(UPPER((oDCli)->SESSO)),3,4)}
                                          oCol:cHeader  := "Sesso"
                                          oCol:nWidth   :=40
                                          oCol:nHeadBmpNo    := 2
                                          oCol:nHeadBmpAlign := AL_RIGHT
                                          oCol:bLClickHeader :={ ||(Sel_Index(3,oDCli) , oApp():oTab:nOption:=3,oApp():oTab:refresh()) }



                                          oCol:= oApp():oGrid:AddCol()
                                          oCol:AddResource("FONDATORE")
                                          oCol:AddResource("ORDINARIO")
                                          oCol:AddResource("SOSTENITORE")
                                          oCol:AddResource("ALTRO")
                                          *oCol:bStrData := { || (oDCli)->TIPO}
                                          oCol:cHeader  := "Adesione"
                                       *   oCol:bEditValue := { || (oDCli)->TIPO }
                                          oCol:nDataStyle := oCol:DefStyle( AL_LEFT, .T.)
                                          oCol:bBmpData := { || (oDCli)->TIPO}
                                           oCol:nWidth   := 30






      oCol:= oApp():oGrid:AddCol()
                                          oCol:AddResource("sort1")
                                          oCol:AddResource("sort2")
                                          oCol:AddResource("ATTIVO")
                                          oCol:AddResource("NOATTIVO")
                                           *oCol:bStrData := { || (oDCli)->STATO}
                                          oCol:cHeader  := "Status"
                                          oCol:nHeadBmpNo    := 2
                                          oCol:nHeadBmpAlign := AL_RIGHT
                                          oCol:bBmpData   := { || iif( (oDCli)->STATO, 3, 4) }
                                          oCol:bLClickHeader :={ ||(Sel_Index(5,oDCli) , oApp():oTab:nOption:=5,oApp():oTab:refresh()) }





                                          oCol:= oApp():oGrid:AddCol()
                                          oCol:AddResource("sort1")
                                          oCol:AddResource("sort2")
                                          oCol:nHeadBmpNo    := if( (oDCli)->( ORDNUMBER() ) == 6, 1, 2)
                                          oCol:nHeadBmpAlign := AL_RIGHT
                                          oCol:bLClickHeader :={ ||(Sel_Index(7,oDCli) , oApp():oTab:nOption:=7,oApp():oTab:refresh()) }
                                          oCol:AddBmpFile(".\BITMAPS\MENU\GRADI\GIOVANE.BMP")
                                          oCol:AddBmpFile(".\BITMAPS\MENU\GRADI\PENSIONATO.BMP")
                                          oCol:AddBmpFile(".\BITMAPS\MENU\GRADI\STUDENTE.BMP")
                                          oCol:AddBmpFile(".\BITMAPS\MENU\GRADI\ESPERTO.BMP")
                                          oCol:AddBmpFile(".\BITMAPS\MENU\GRADI\OBIETTORE.BMP")
                                          oCol:AddBmpFile(".\BITMAPS\MENU\GRADI\REGIONALE.BMP")
                                          oCol:bStrData := { || (oDCli)->ATTIVITA}
                                          oCol:cHeader  := "Tipo"
                                          oCol:bEditValue := { || (oDCli)->ATTIVITA }
                                          oCol:nDataStyle := oCol:DefStyle( AL_LEFT, .T.)

                                          oCol:bBmpData := { || (oDCli)->attivita + 2}
                                          oCol:nWidth   :=40




                                          oCol:= oApp():oGrid:AddCol()
                                          oCol:AddResource("sort1")
                                          oCol:AddResource("sort2")
                                          oCol:cHeader  := "Grado"
                                          oCol:nHeadBmpNo    := if( (oDCli)->( ORDNUMBER() ) == 7, 1, 2)
                                          oCol:nHeadBmpAlign := AL_RIGHT
                                          oCol:bLClickHeader :={ ||(Sel_Index(6,oDCli) , oApp():oTab:nOption:=6,oApp():oTab:refresh()) }
                                          oCol:AddResource("GRADO1")
                                          oCol:AddResource("GRADO2")
                                          oCol:AddResource("GRADO3")
                                          oCol:AddResource("GRADO4")
                                          oCol:AddResource("GRADO5")
                                          oCol:AddResource("GRADO6")
                                          oCol:AddResource("GRADO7")
                                          oCol:AddResource("GRADO8")
                                          oCol:AddResource("GRADO0")
                                          oCol:bStrData := { || (oDCli)->GRADO}
                                          oCol:bBmpData := { || (oDCli)->GRADO + 2}
                                          oCol:nWidth   :=40




                                          oCol:= oApp():oGrid:AddCol()
                                          oCol:bStrData := { ||   CF((oDCli)->NASCITA)}
                                          oCol:cHeader  := "Data di nascita"
                                          oCol:nWidth   := 90


                                          oCol:= oApp():oGrid:AddCol()
                                          oCol:bStrData := { ||   (oDCli)->LUO_NASC }
                                          oCol:cHeader  := "Luogo di Nascita"
                                          oCol:nWidth   := 150


                                          oCol:= oApp():oGrid:AddCol()
                                          oCol:bStrData := { ||  (oDCli)->INDIRIZZO }
                                          oCol:cHeader  := "Indirizzo"
                                          oCol:nWidth   := 200

                                          oCol:= oApp():oGrid:AddCol()
                                          oCol:AddResource("sort1")
                                          oCol:AddResource("sort2")
                                          oCol:bStrData := { ||   (oDCli)->LOCALITA }
                                          oCol:cHeader  := "Località"
                                          oCol:nWidth   := 100
                                          oCol:bLClickHeader :={ ||(Sel_Index(4,oDCli), oApp():oTab:nOption:=4,oApp():oTab:refresh())  }






   oApp():oGrid:nFreeze :=3
   oApp():oGrid:SetRDD()
  oApp():oGrid:bClrStd := { || Colores(oDCli) }


   oApp():oGrid:SetBackGround( ".\bitmaps\pclogog.BMP" )
   oApp():oGrid:CreateFromCode()
   oApp():oGrid:bChange    :={ || (RefreshCont(oCont,oDCli)) }
   oApp():oGrid:bRClicked := {|nRow,nCol| Disp_Men(oApp():oDlg,nRow,nCol,oDCli) }
   oApp():oGrid:bKeyDown   :={|nKey| Val_nKey(nKey,oApp():oDlg)}


  oApp():oGrid:bSeek      :={|c| DbSeek( Upper( c ) ) }
  oApp():oGrid:nRowHeight  :=40
  oApp():oGrid:nHeaderHeight  := 36
  oApp():oGrid:RestoreState( cState )

   (oDCli)->(DbSetOrder(nOrder))
   (oDCli)->(DbGoTo(nRecno))
   Sel_Index(nOrder,oDCli)


......





STATIC FUNCTION Colores(cdbf)
   LOCAL aCol:={}
IF  (cdbf)->(Ordkeyno()) % 2 == 0
   aCol:={CLR_BLACK, RGB(193,221,255) }

ELSE
   aCol:={CLR_BLACK, RGB(221,245,255) }
ENDIF
RETURN (aCol)




Best Regards, Saludos

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

Re: TO GURUS : TRANSPARENT ERROR WITH XBROWSE

Postby ukoenig » Tue Jan 27, 2009 11:26 am

Hello Silvio,

Please can You try to add this to Your xBrowse, to test, if Your BMP's are visible ?
I think, the Bar-color covers the BMP.
change < oBrw5 > with Your Browse-object.

// Transparent Row-selection
// -----------------------------------
aeval( oBrw5:aCols, { |o|o:lColTransparent := .t. } )

Regards
Uwe :lol:
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 GURUS : TRANSPARENT ERROR WITH XBROWSE

Postby Silvio » Tue Jan 27, 2009 12:03 pm

Uwe,
I insert also oCol:lColTransparent := .t. on six and seven column
but it not run

look it please

Image
Best Regards, Saludos

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

Re: TO GURUS : TRANSPARENT ERROR WITH XBROWSE

Postby ukoenig » Tue Jan 27, 2009 8:54 pm

Hello Silvio,

I have done some more tests :
I created a Main-window with Daniel's sample, after that I added a Dialog-resource
on top of the Window.
For the xBrowse inside the Dialog, I used the same syntax like for the Main-Window.
The xBrowse inside the Main-Window works. Inside the Dialog-resource, the selected
Row didn't show the BMP. I created a Dialog / xBrowse from Source and Resource.
Transparent works inside a Dialog-resource :
aeval( oBrw5:aCols, { |o|o:lColTransparent := .t. } )

Daniel tested with a Window, maybe he has done a sample < Window / Dialog-combination >.
I don't know, why the result is different inside the Dialog, I have done many tests.

Image

Regards
Uwe :lol:
Last edited by ukoenig on Tue Jan 27, 2009 10:43 pm, 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

PreviousNext

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 85 guests