Colors in Browses
-
- Posts: 484
- Joined: Wed Jan 27, 2010 10:25 pm
- Location: Berlin Germany
Colors in Browses
Hi all,
there is a difference between 2.0 and 1.9 how the color of the hilited row is shown (see screenshots).
The foreground color always is black. Is there a workaround for this ?
there is a difference between 2.0 and 1.9 how the color of the hilited row is shown (see screenshots).
The foreground color always is black. Is there a workaround for this ?
- Attachments
-
- With 2.0
- Screen2.0.jpg (57.26 KiB) Viewed 22444 times
-
- With 1.9
- screen1.9.jpg (54.18 KiB) Viewed 22444 times
_______________________
Best Regards
Wolfgang
Best Regards
Wolfgang
-
- Posts: 605
- Joined: Thu Jan 28, 2010 9:11 pm
- Location: Steven Point, Wisconsin USA
- Contact:
Re: Colors in Browses
Don't know about this but I have experienced a different issue with 1.9 vs 2.0.
For a disabled checkbox, the background color does not appear to be able to be set via :setcolorbg(). I had to instead set it via the presentation parameters clause.
For a disabled checkbox, the background color does not appear to be able to be set via :setcolorbg(). I had to instead set it via the presentation parameters clause.
Re: Colors in Browses
Send me a small test program. I'll look into this.
The eXpress train is coming - and it has more cars.
-
- Posts: 484
- Joined: Wed Jan 27, 2010 10:25 pm
- Location: Berlin Germany
Re: Colors in Browses
Hello Roger,
attached is a small example, extracted from my prog.
Someone in the german forum says, that he had a lot of discussions with Till from Alaska about Browses.
He says, if you set the arrays in :colorBlock with 4 parameters {cColor, NIL, cColor, NIL} the coloring should work ?!
attached is a small example, extracted from my prog.
Someone in the german forum says, that he had a lot of discussions with Till from Alaska about Browses.
He says, if you set the arrays in :colorBlock with 4 parameters {cColor, NIL, cColor, NIL} the coloring should work ?!
- Attachments
-
- Test_Browse2.zip
- (48.62 KiB) Downloaded 954 times
_______________________
Best Regards
Wolfgang
Best Regards
Wolfgang
Re: Colors in Browses
Hi
in my v1.9 is the foreground color black not blue
with your code
in my v1.9 is the foreground color black not blue
with your code
best regards
Hans
Hans
-
- Posts: 484
- Joined: Wed Jan 27, 2010 10:25 pm
- Location: Berlin Germany
Re: Colors in Browses
Thats right. The problem is the selected row, if you are on a colored row you do not see the blue or red anymore, always black.
_______________________
Best Regards
Wolfgang
Best Regards
Wolfgang
Re: Colors in Browses
Did you try it? I did, and it seems to work just fine.He says, if you set the arrays in :colorBlock with 4 parameters {cColor, NIL, cColor, NIL} the coloring should work ?!
Code: Select all
local bStdClrSp:={|| iif(ascan(aSelRec,recno())<>0,BRW_CLR_MARKED,iif(bau->baucolor<>0,{bau->baucolor,nil,bau->baucolor,nil},BRW_CLR_NONE))}
The eXpress train is coming - and it has more cars.
-
- Posts: 484
- Joined: Wed Jan 27, 2010 10:25 pm
- Location: Berlin Germany
Re: Colors in Browses
It thought, i tested it. Yes, it is working, thanks.
_______________________
Best Regards
Wolfgang
Best Regards
Wolfgang
-
- Posts: 484
- Joined: Wed Jan 27, 2010 10:25 pm
- Location: Berlin Germany
Re: Colors in Browses
Hello Roger,
can you change the TAGCOLOR of DCBrowses, so that it accept an array with 4 elements ?
With XBase++ 2.0 the marked item is nor visible anymore, if the browse cursor is on that row.
Or can i manipulate the tagcolor in another way ?
can you change the TAGCOLOR of DCBrowses, so that it accept an array with 4 elements ?
With XBase++ 2.0 the marked item is nor visible anymore, if the browse cursor is on that row.
Or can i manipulate the tagcolor in another way ?
_______________________
Best Regards
Wolfgang
Best Regards
Wolfgang
Re: Colors in Browses
I suggest that you replace DC_XbpBrowse:rowColor() with the below code in _DCXBROW.PRG and rebuild DCLIPX.DLL. Let me know if this works for you.can you change the TAGCOLOR of DCBrowses, so that it accept an array with 4 elements ?
Code: Select all
METHOD DC_XbpBrowse:rowColor()
LOCAL aColor, aBrowseColor := DC_BrowseColor()
IF Valtype(::dataSource) == 'C'
IF ::tagEnable .AND. (::dataSource)->(DC_Tagged())
RETURN {::tagColorFG, nil, ::tagColorBG, nil} <<<<<<<<<<<<<<<<<<
ELSEIF (::dataSource)->(RecNo()) <> ::nBRow
::lBRow := !::lBRow
::nBRow := (::dataSource)->(RecNo())
ENDIF
ELSEIF Valtype(::dataSource) == 'A' .AND. Len(::dataSource) > 0
IF ::tagEnable .AND. ::arrayElement > 0 .AND. ::dataSource[::arrayElement,::tagElement]
RETURN {::tagColorFG, nil, ::tagColorBG, nil} <<<<<<<<<<<<<<<<<<
ELSEIF (::arrayElement) % 2 == 0
::lBRow := .t.
ELSE
::lBrow := .f.
ENDIF
ELSE
::lBrow := .t.
ENDIF
IF Valtype(aBrowseColor) == 'A'
IF ::lBRow
aColor := {aBrowseColor[1],aBrowseColor[2]}
ELSE
aColor := {aBrowseColor[3],aBrowseColor[4]}
ENDIF
ELSE
aColor := { nil, nil}
ENDIF
RETURN aColor
The eXpress train is coming - and it has more cars.