color to brush

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • boxim

    #1

    color to brush

    having a moment,

    cant you just
    Brush br = new Brush(Color.Bla ck);??? saying you cant cos it's an abstract
    class

    need to get to a brush from a color

    tia
    sam martin


  • Miha Markic

    #2
    Re: color to brush

    Hi,

    Use SolidBrush instead.

    --
    Miha Markic - RightHand .NET consulting & software development
    miha at rthand com

    "boxim" <sambomartin@ya hoo.co.uk> wrote in message
    news:un9NHFKxDH A.3408@tk2msftn gp13.phx.gbl...[color=blue]
    > having a moment,
    >
    > cant you just
    > Brush br = new Brush(Color.Bla ck);??? saying you cant cos it's an abstract
    > class
    >
    > need to get to a brush from a color
    >
    > tia
    > sam martin
    >
    >[/color]


    Comment

    • n!

      #3
      Re: color to brush

      > cant you just[color=blue]
      > Brush br = new Brush(Color.Bla ck);??? saying you cant cos it's an abstract
      > class
      >
      > need to get to a brush from a color[/color]

      You need to use SolidBrush for a solid color. You can also gain access to a
      colored brush with:

      Brush br = Brushes.Black;

      (which exists in the System.Drawing namespace).

      n!


      Comment

      Working...