f



Hatch patterns in selected bBrowser cells

I have a bBrowser with rows alternately green and white.  Some cells are in=
accessible, indicated visually by a diagonally hatched Brush{}.  But the ha=
tch options of Brush{} are all drawn in black-on-white, and in my green row=
s, I'd like to make them black-on-green.  Changing the AlphaBlendRatio does=
n't seem to help, and I'd rather avoid the complexities of pulling in a bit=
map via bCompoundValue.  Does anyone know an elegant solution to this probl=
em?
0
rkaplan328
11/8/2016 8:55:29 PM
comp.clipper.visual-objects 12618 articles. 0 followers. Post Follow

2 Replies
252 Views

Similar Articles

[PageSpeed] 34

Hi Richard

> I have a bBrowser with rows alternately green and white.  Some cells are
> inaccessible, > indicated visually by a diagonally hatched Brush{}.
> But the hatch options  of Brush{} are all drawn in black-on-white, and in
> my green rows, I'd like to make them black-on-green.  Changing the
> AlphaBlendRatio doesn't seem to help, and  I'd rather avoid the
> complexities of pulling in a bitmap via bCompoundValue.
> Does anyone know an elegant solution to this problem?

You can see the same behaviour when you assign such a brush to a standard
TextControl. e.g.

oTxtControl:Background := Brush { Color { COLORBLACK }, HATCHDIAGONALCROSS }

The shading is drawn in black while the background is white. To achieve a
green Background it´s necessary to subclass the Textcontrol and override
the VO Control-Method "___SetColors()"


CLASS txtHatch INHERIT TextControl

METHOD __SetColors(hDC AS PTR) AS PTR PASCAL CLASS txtHatch

    // Set the Backgroundcolor of a hatchbrush

    SetBkColor ( hDC , DWORD( RGB ( 0 , 255 , 0 ) ) )  // green

    RETURN SUPER:__SetColors(hDC )


I don´t know if it´s possible to hook in one of the bBrowser events to
achieve the same for a particular cell,  but maybe Joachim can give some
hints.


regards
Karl-Heinz 

0
Karl
11/9/2016 10:42:03 AM
Hello,

You can define the Brush like this:

MyBrush:=Brush{Color{150,250,180},HATCHDIAGONALCROSS}

Camille

On 08/11/16 21:55, rkaplan328 wrote:
> I have a bBrowser with rows alternately green and white.  Some cells are inaccessible, indicated visually by a diagonally hatched Brush{}.  But the hatch options of Brush{} are all drawn in black-on-white, and in my green rows, I'd like to make them black-on-green.  Changing the AlphaBlendRatio doesn't seem to help, and I'd rather avoid the complexities of pulling in a bitmap via bCompoundValue.  Does anyone know an elegant solution to this problem?
>

0
Camille
11/9/2016 11:33:33 AM
Reply: