xBrowse < oLbx:bClrSelFocus > not allways works ?

xBrowse < oLbx:bClrSelFocus > not allways works ?

Postby ukoenig » Sat Dec 06, 2008 2:29 pm

Hello,

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

Image

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

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

Code: Select all  Expand view

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 :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

Postby Daniel Garcia-Gil » Sat Dec 06, 2008 3: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
User avatar
Daniel Garcia-Gil
 
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita

Postby Daniel Garcia-Gil » Sat Dec 06, 2008 3:40 pm

see row transparet using MARQSTYLE_HIGHLROW or up

Step 1..
New DATA to CLASS TXBrwColumn
Code: Select all  Expand view
DATA lColTransparent      INIT .f.


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


for this line
Code: Select all  Expand view
   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..
Code: Select all  Expand view
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

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

Transparent background

Postby ukoenig » Sat Dec 06, 2008 4: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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Otto and 90 guests