Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Karl-Heinz" Newsgroups: comp.lang.clipper.visual-objects Subject: Re: Hatch patterns in selected bBrowser cells Date: Wed, 9 Nov 2016 11:42:03 +0100 Lines: 39 Message-ID: References: <8abc8d77-7230-4701-98ad-db64f0c96974@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset="UTF-8"; reply-type=original Content-Transfer-Encoding: 8bit X-Trace: individual.net GFk7Dog0WRlg7+5Wat4kzgNspgGrTvUxkXEefY6Ym3vNEW+ww= Cancel-Lock: sha1:UlPJk+63Zxnby3kD/YoW0LNl/S8= In-Reply-To: <8abc8d77-7230-4701-98ad-db64f0c96974@googlegroups.com> X-Priority: 3 X-MSMail-Priority: Normal Importance: Normal X-Newsreader: Microsoft Windows Live Mail 16.4.3564.1216 X-MimeOLE: Produced By Microsoft MimeOLE V16.4.3564.1216 Xref: csiph.com comp.lang.clipper.visual-objects:9912 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