Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #9910 > unrolled thread

Hatch patterns in selected bBrowser cells

Started byrkaplan328 <richard.d.kaplan@gmail.com>
First post2016-11-08 12:55 -0800
Last post2016-11-09 12:33 +0100
Articles 3 — 3 participants

Back to article view | Back to comp.lang.clipper.visual-objects


Contents

  Hatch patterns in selected bBrowser cells rkaplan328 <richard.d.kaplan@gmail.com> - 2016-11-08 12:55 -0800
    Re: Hatch patterns in selected bBrowser cells "Karl-Heinz" <invalid@invalid.invalid> - 2016-11-09 11:42 +0100
    Re: Hatch patterns in selected bBrowser cells Camille Kater <katercam@pt.lu> - 2016-11-09 12:33 +0100

#9910 — Hatch patterns in selected bBrowser cells

Fromrkaplan328 <richard.d.kaplan@gmail.com>
Date2016-11-08 12:55 -0800
SubjectHatch patterns in selected bBrowser cells
Message-ID<8abc8d77-7230-4701-98ad-db64f0c96974@googlegroups.com>
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?

[toc] | [next] | [standalone]


#9912

From"Karl-Heinz" <invalid@invalid.invalid>
Date2016-11-09 11:42 +0100
Message-ID<e8gd1lF6f3bU1@mid.individual.net>
In reply to#9910
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 

[toc] | [prev] | [next] | [standalone]


#9913

FromCamille Kater <katercam@pt.lu>
Date2016-11-09 12:33 +0100
Message-ID<1478685058_1@vo.lu>
In reply to#9910
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?
>

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.clipper.visual-objects


csiph-web