Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Resetting ppshape brush styles

edited June 2003 in General
Hi all,

I am doing a report basically completely in code. I have a graph that I am
creating with TppShapes. Awkward as heck, but I have created the graph
pretty well as I want. NOW, all I want to do is to pattern the various
blocks.

I tried the following code to change blocks initially set to bsClear.

if ps = 'WOOD'
then if ss = 'REAL'
then GraphPart2.brush.style := bsFDiagonal
else GraphPart2.brush.style := bsBDiagonal;
if ps = 'FABRIC'
then if ss = 'REAL'
then GraphPart2.brush.style := bsHorizontal
else GraphPart2.brush.style := bsVertical;
if ps = 'LEATHER'
then if ss = 'FAKE'
then GraphPart2.brush.style := bsCross
else GraphPart2.brush.style := bsDiagCross;
if ps = 'UNKNOWN'
then GraphPart2.brush.style := bsSolid;

IF I step through the code, I can see it hit the WOOD, then REAL
and go to the bsFDiagonal line. Yet, when the report appears, the
shape is clear. As are all the rest of them. And bsClear should be
VERY rare, as UNKNOWN is the catchall for most of the situations not
covered by the six prior alternatives.

Any help for this user of Delphi 5.01, RepBuilder 7.02? Thanks in
advance.

GM
==========================================
When replying via email please move all
numbers from right of at symbol to left of
at symbol to get email address.

Comments

  • edited June 2003
    Hi all,

    Found my own answer. When I switched the actual component to brush
    style bsClear, it changed the bsColour to clWhite at the same time.
    I've since put in some convuluted logic to check for NOT any of the
    usual possibilities, after which I set it the bsClear. The new default
    is bsSolid, colour=clBlack. The code works as hoped for.

    Sorry to bother anybody who's already answered this query.

    GM

    On Wed, 25 Jun 2003 00:29:47 -0400, Gary Mugford
This discussion has been closed.