FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour xBrowse < oLbx:bClrSelFocus > not allways works ?
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
xBrowse < oLbx:bClrSelFocus > not allways works ?
Posted: Sat Dec 06, 2008 02:29 PM
Hello,

I wanted to define a focused Text-color.
It seems, it only works together with something like :
oLbx:nMarqueeStyle := MARQSTYLE_HIGHLROW



I need this !!!!
-----------------


It only works with :
oLbx:nMarqueeStyle := MARQSTYLE_HIGHLROW
but the row is not transparent with this selection.
--------------------------------------------------------


AADD(aTEXT1, { "This is Textline 1" })
AADD(aTEXT1, { "This is Textline 2" })
AADD(aTEXT1, { "This is Textline 3" })
AADD(aTEXT1, { "This is Textline 4" })
AADD(aTEXT1, { "This is Textline 5" })
AADD(aTEXT1, { "This is Textline 6" })
AADD(aTEXT1, { "This is Textline 7" })

// 16777215 = white
//  65535 = yellow

oLbx2 := TXBrowse():New( oFld:aDialogs[2] )
// oLbx2:nMarqueeStyle := MARQSTYLE_HIGHLROW
// ----------------------------------------------------------
oLbx2:nColDividerStyle := LINESTYLE_BLACK
oLbx2:nRowDividerStyle := LINESTYLE_BLACK
oLbx2:nRecSelColor := 14592854         // Record-Selector
oLbx2:bClrStd := { || { 16777215, } }       // Text and background
oLbx2:bClrSelFocus := { || { 65535, 128 } }  // Focus-Color
// --------------------------------------------------------------------------------
oLbx2:bClrSel = { || { 0, 65535 } }                 // Lost Focus
oLbx2:SetArray( aTEXT1 )
// !!!!!!
oLbx2:cBmpAdjBrush := "Tree.bmp" 
oLbx2:SetBackGround( "Tree.bmp" )
// !!!!!!
oLbx2:aCols[ 1 ]:cHeader = Padr("Info", 150) 
oLbx2:lHScroll := .T.
oLbx2:lVScroll := .T.
oLbx2:lFooter := .T.
oLbx2:lRecordSelector  := .T.

oLbx2:CreateFromResource( 210 )


Regards
Uwe :-)
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.
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 PM
xBrowse < oLbx:bClrSelFocus > not allways works ?
Posted: Sat Dec 06, 2008 03:25 PM
bClrSelFocus color cell selected
bClrRowFocus color row selected

when you use MARQSTYLE_HIGHLROW or up
you can use oLbx2:bClrSelFocus and oLbx:bClrRowFocus (you can see this with 2 or more columns)

using only MARQSTYLE_HIGHLROW or up
color selection row will be default

using MARQSTYLE_HIGHLROW or up with oLbx2:bClrSelFocus
the browse use oLbx2:bClrSelFocus color to oLbx:bClrRowFocus

using MARQSTYLE_HIGHLROW or up with oLbx2:bClrSelFocus and oLbx:bClrRowFocus
the browse use oLbx2:bClrSelFocus and oLbx:bClrRowFocus
individually

you need modify the class to see row transparent

SO SORRY MY ENGLISH I HOPE YOU UNDESTAND ME
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 PM
xBrowse < oLbx:bClrSelFocus > not allways works ?
Posted: Sat Dec 06, 2008 03:40 PM
see row transparet using MARQSTYLE_HIGHLROW or up

Step 1..
New DATA to CLASS TXBrwColumn
DATA lColTransparent		INIT .f.


Step 2...
Change this line in method PainData
   if oBrush != nil
      hBrush      := oBrush:hBrush
      lBrush      := .t.
      lTransparent:= .f.
   elseif ! lTransparent
      hBrush  := CreateSolidBrush( aColors[ 2 ] )
   endif


for this line
   if oBrush != nil
      hBrush      := oBrush:hBrush
      lBrush      := .t.
      lTransparent:= .f.
   elseif ! lTransparent .and. !::lColTransparent
      hBrush  := CreateSolidBrush( aColors[ 2 ] )
   elseif ::lColTransparent
   		hBrush := CreateSolidBrush( 0 )
   		lTransparent := .t.
   endif


example..
aBrw[ 1 ]:= txbrowse():new( oFolder:aDialogs[ 1 ] )
aBrw[ 1 ]:nRowHeight := 25
aBrw[ 1 ]:nColDividerStyle 	:= LINESTYLE_BLACK
aBrw[ 1 ]:nRowDividerStyle 	:= LINESTYLE_BLACK
aBrw[ 1 ]:SetArray( aArray1 )
aBrw[ 1 ]:cBmpAdjBrush 			:= "tree.bmp"
aBrw[ 1 ]:SetBackGround( "tree.bmp" )
aBrw[ 1 ]:nTop 							:= 0
aBrw[ 1 ]:nLeft							:= 0
aBrw[ 1 ]:nBottom						:= 120
aBrw[ 1 ]:nRight						:= 160
aBrw[ 1 ]:nMarqueeStyle			:= MARQSTYLE_HIGHLROW
aBrw[ 1 ]:bClrRowFocus:={||{CLR_BLUE,NIL} } //use whatever color back, remember is transparent
aBrw[ 1 ]:bClrSelFocus:={||{CLR_RED,NIL} } //use whatever color back, remember is transparent

aeval( aBrw[ 1 ]:aCols, { |o|o:lColTransparent := .t. } ) // u can use 1 column or all colomns or some columns transparent

Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Transparent background
Posted: Sat Dec 06, 2008 04:24 PM

Hello Daniel,

It's tested and works perfect !!!
Great job.

Thank You very much.

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.

Continue the discussion