Gradient brush

Just wanted to contribute that the documentation doesn’t tell you but you need to set the Gradient Brush to Nil after using it or all the subsequent drawing will use the same gradient effect. To wit:

g.Brush = Nil

I think it’s expected, thought: any object keeps its properties as long as you don’t change them. If you change the colour of a graphics object, it’ll also stay the same until you change it.
But thanks for the contribution anyway :slightly_smiling_face:.

1 Like

It isn’t expected by someone like me … a hobbyist programmer who doesn’t get half of what he’s doing.

I’m curious: what were you expecting to occur?

I had never used the Gradient brush before, didn’t understand that once assigned to the graphics object (g.) that all subsequent drawing would be affected. I only wanted a rectangle to be “gradiented.” Then I read somewhere you had to shut it off but how? Well I found out.

Granted, but you’ll expect it by practice :wink: