Border colour of flat button

G

Guest

Is it possible to change the border colour of a button whos FlatStyle is set
to Flat? It's be nice to be able to change the width of the border too.

Any ideas?

Darrell
 
E

Emre Guldogan

<style type=text/css>INPUT { BORDER-RIGHT: #ffffff 5px groove; BORDER-TOP:
#ffffff 5px groove;BORDER-LEFT: #ffffff 5px groove; BORDER-BOTTOM: #ffffff
5px groove;}
</style>
 
T

thb

The border color is the same as the text color (ForeColor).

You can paint anything you want on a button, though, including a
border. The job is done inside the Paint event :

private void button1_Paint(object sender,
System.Windows.Forms.PaintEventArgs e) {

e.Graphics.DrawRectangle(Pens.Red, 0, 0, button1.Width-1,
button1.Height-1);

}

would draw a red border.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top