Bitmap in xBrowse

Bitmap in xBrowse

Postby Detlef Hoefner » Mon Feb 02, 2009 10:01 am

Hi all,

i have a xBrowse column where i put a bitmap beside the data to show that there is something special with that data.
Unfortunately this bitmap gets badly visible when the row gets selected.
I know it's not a xBrowse error but bad color from my side.

Image

Is there a way just to highlite only colums 2 and 3 so that my bitmaps stays visible?

Regards,
Detlef
User avatar
Detlef Hoefner
 
Posts: 312
Joined: Sat Oct 08, 2005 9:12 am
Location: Germany

Re: Bitmap in xBrowe

Postby Silvio » Mon Feb 02, 2009 10:29 am

there is another topic for this problem
We are working ( daniel, Uwe and me) to resolve the problem
viewtopic.php?f=3&t=14347
Best Regards, Saludos

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

Re: Bitmap in xBrowe

Postby ukoenig » Mon Feb 02, 2009 10:43 pm

Hello Detlef,

can You add these two lines to Your xBrowser, to see, if there is a change ?
In my tests, the BMP is visible.

Code: Select all  Expand view
// for < oBrw > use Your browse-object
// -------------------------------------------
aClrCol := { { 0, 15724527 }, { 0, 14671839 } } // Alternated Colors
oBrw:bClrStd := { || aClrCol[ oBrw:KeyNo % 2 + 1 ] }


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: Bitmap in xBrowe

Postby Detlef Hoefner » Tue Feb 03, 2009 8:30 am

Hi Silvio and Uwe,

i think i made a bad description of my problem.
The bitmap is not hidden.
Its just too dark and a dark lightbar makes it hard to see.
I now made the lightbar with a very bright color.
But i would prefer a lightbar with the original blue color which covers only my columns 2, 3 and not column 1.
Someone how how to do this?

Thanks for your advices.
Regards,
Detlef
User avatar
Detlef Hoefner
 
Posts: 312
Joined: Sat Oct 08, 2005 9:12 am
Location: Germany

Re: Bitmap in xBrowse

Postby Antonio Linares » Tue Feb 03, 2009 10:23 am

Detlef,

Try to set this DATA of your first column object:
Code: Select all  Expand view
   oCol1:bClrSelFocus = { || { CLR_BLACK, CLR_WHITE } } 

Here you have a working example:
Code: Select all  Expand view
#include "FiveWin.ch"
#include "XBrowse.ch"

function Main()

   local oWnd, oBrw, oCol

   USE Customer

   DEFINE WINDOW oWnd
   
   @ 0, 0 XBROWSE oBrw OF oWnd ALIAS "Customer"
   
   oCol = oBrw:AddCol()
   oCol:bStrData = { || Customer->First }
   oCol:cHeader = "First"
   oCol:bClrSelFocus = { || { CLR_BLACK, CLR_WHITE } } 

   oCol = oBrw:AddCol()
   oCol:bStrData = { || Customer->Last }
   oCol:cHeader = "Last"

   oCol = oBrw:AddCol()
   oCol:bStrData = { || Customer->Street }
   oCol:cHeader = "Street"
   
   oBrw:nMarqueeStyle = MARQSTYLE_HIGHLROW
   
   oBrw:CreateFromCode()
   
   oWnd:oClient = oBrw

   ACTIVATE WINDOW oWnd

return nil

Image
regards, saludos

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

Re: Bitmap in xBrowse

Postby ukoenig » Tue Feb 03, 2009 10:35 am

Hello Detlef,

You can use Antonio's solution or change the color of the focused row with any
of the blue-color-values ( +, ++ ( lighter ) :

Code: Select all  Expand view
// 0 = Black
// 16777215 = White
// 8388608 = DarkBlue
// 15365376 = Blue +
// 16757606 = Blue ++
// 16764831 = Blue +++
// 16767411 = Blue ++++

// Selected Row-color on Focus ( Text / Background )
// ------------------------------------------------------------
oLbx:bClrSelFocus = { || { 0, 16757606 } } 

// Selected Row-color on change Focus ( Text / Background )
// -----------------------------------------------------------------
oLbx:bClrSel = { || { 0, 16757606 } } 



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: Bitmap in xBrowse

Postby Detlef Hoefner » Tue Feb 03, 2009 10:48 am

Antonio,

many thanks for your help.
Its working fine now.

Also thanks to Uwe for your color tip.

Regards,
Detlef
User avatar
Detlef Hoefner
 
Posts: 312
Joined: Sat Oct 08, 2005 9:12 am
Location: Germany

Re: Bitmap in xBrowse

Postby ukoenig » Tue Feb 03, 2009 11:01 am

Hello Detlef,

A screenshot :

Image

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: Bitmap in xBrowse

Postby Silvio » Tue Feb 03, 2009 12:01 pm

why on my application I cannot see the bitmaps ???????
Best Regards, Saludos

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

Re: Bitmap in xBrowse

Postby ukoenig » Tue Feb 03, 2009 2:56 pm

Hello Silvio,

I hope I get it ready, to put a early release of the tools tomorrow in this place.
It is easy for You, to check all possible combinations to see what's wrong.
There are 9 different backgrounds together for Windows and Dialog = 18 Test.
These tests in combination with Marquestyles ( 7 ) are together 126 Tests.
Maybe with all the tests, we can find out, what's wrong.
Some combinations are working ( 80 % :roll: ), some not.

Test Selection

Image

Selection Result ( xBrowse-Test in Windows and Dialog together )

Image

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: Bitmap in xBrowse

Postby Silvio » Tue Feb 03, 2009 3:21 pm

I use a special dialog ( nOR( WS_CHILD, 4 ))
and I put xbrowse into
Now I use this :
Code: Select all  Expand view
   App():oDlg:NewGrid( nSplit )
   oApp():oGrid:nColDividerStyle    := LINESTYLE_BLACK
   oApp():oGrid:nRowDividerStyle    := LINESTYLE_FORECOLOR
   oApp():oGrid:nMarqueeStyle       :=MARQSTYLE_HIGHLCELL




   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:bClrStd := {|| {CLR_WHITE, CLR_BLACK} }
   *  oApp():oGrid:cBmpAdjBrush :=".\bitmaps\pclogog.BMP"


   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)



I can see the bitmaps but the bar is on each cell and not on each row as U can see here :

Image

I cannot use the backgroud because in this mode it not is usefull...
Best Regards, Saludos

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

Re: Bitmap in xBrowse

Postby ukoenig » Tue Feb 03, 2009 7:28 pm

Hello Silvio,

during preparing the download, I tested colors.
Because of a mistake, the rowselection of the dialog was white. Suddenly I could see the bitmap.
Slowly I am a little bit perplexed.

Code: Select all  Expand view

oBrw:nMarqueeStyle :=  MARQSTYLE_HIGHLROW
oBrw:nRecSelColor = 15512898

// Selected Row Black on White
oBrw:bClrSelFocus = { || { 0, 16777215 } } 
 
// LostFocus Black on White
oBrw:bClrSel = { || { 0, 16777215 } }       



Image

The same Test with a brush :

Image

Regards
Uwe :cry:
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: Bitmap in xBrowse

Postby Silvio » Tue Feb 03, 2009 11:26 pm

Now run but now I have a white bar
I wish have a bar with a light color
how I can modify it ?
Best Regards, Saludos

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

Re: Bitmap in xBrowse

Postby Silvio » Tue Feb 03, 2009 11:34 pm

found !!!
I insert the darkorange color office 2007 style ...now I see bitmaps

oApp():oGrid:nColDividerStyle := LINESTYLE_BLACK
oApp():oGrid:nRowDividerStyle := LINESTYLE_FORECOLOR

oApp():oGrid:nMarqueeStyle := MARQSTYLE_HIGHLROW

oApp():oGrid:nRecSelColor = 15512898

// Selected Row Black on White
oApp():oGrid:bClrSelFocus = { || { 0, nRGB( 238, 152, 25 ) } }

// LostFocus Black on White
oApp():oGrid:bClrSel ={ || { 0, nRGB( 238, 152, 25 ) } }
Best Regards, Saludos

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

Re: Bitmap in xBrowse

Postby Silvio » Wed Feb 04, 2009 11:09 am

#define DARKCYAN nRGB( 125, 165, 224 )

oApp():oGrid:nRecSelColor = 15512898
// Selected Row Black on White
oApp():oGrid:bClrSelFocus = { || { 0, DARKCYAN } }

// LostFocus Black on White
oApp():oGrid:bClrSel ={ || { 0, DARKCYAN } }


Image
Best Regards, Saludos

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


Return to FiveWin for Harbour/xHarbour

Who is online

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