473,395 Members | 2,798 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Border colour of flat button

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

Nov 16 '05 #1
7 13883
<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>

"redneon" <re*****@discussions.microsoft.com> wrote in message
news:B7**********************************@microsof t.com...
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

Nov 16 '05 #2
That's assuming Darrell's talking about a web app. ;o)

"Emre Guldogan" <ask me please...> wrote in message
news:uQ**************@tk2msftngp13.phx.gbl...
<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>

"redneon" <re*****@discussions.microsoft.com> wrote in message
news:B7**********************************@microsof t.com...
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


Nov 16 '05 #3
How can I add HTML tags to a C# program?

Darrell

"Emre Guldogan" wrote:
<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>

"redneon" <re*****@discussions.microsoft.com> wrote in message
news:B7**********************************@microsof t.com...
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


Nov 16 '05 #4
> That's assuming Darrell's talking about a web app. ;o)

Yeah. It's not a web app.

Nov 16 '05 #5
Sorry Darrell, I assumed that as a web application as Dan said.

"redneon" <re*****@discussions.microsoft.com> wrote in message
news:0C**********************************@microsof t.com...
How can I add HTML tags to a C# program?

Darrell

"Emre Guldogan" wrote:
<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>

"redneon" <re*****@discussions.microsoft.com> wrote in message
news:B7**********************************@microsof t.com...
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


Nov 16 '05 #6
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.

Nov 16 '05 #7
Darrell,

I was looking into this a little for an application I was working on a few
weeks back and realised the button control was quite limited.

Have you tried googling for it? [beware of line wraps]
http://www.google.co.uk/search?hl=en...G=Search&meta=

What others have done with buttons...
http://www.codeproject.com/cs/miscctrl/#Button+Controls

Good luck

Dan.
"redneon" <re*****@discussions.microsoft.com> wrote in message
news:B7**********************************@microsof t.com...
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

Nov 16 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Olly | last post by:
I have been using border styles on form inputs and I have noticed that on Internet Explorer 5.2 Mac the border color always comes out as link-colour blue, no matter what color I specify. This also...
1
by: JSM | last post by:
Hi, is there any way of removing the border from a button when the style is set to Flat. I am assuming the best way is to create a class derived from a standard button and override the On_Paint...
2
by: jrhoads23 | last post by:
If you look at a standard Button in a .NET Windows Forms app, you will notice its default BackColor is "Control" and it has a 3D raised border which is 2 pixels wide. The outer edge on the left and...
5
by: AbdulGafoor GK | last post by:
hi i am using visual studio 2005. i could make combobox flat, but without border. is there any way to draw a border for it ?!!! thanks
6
by: Dan Soendergaard | last post by:
Hi, I'm writing my own control and I would like it to integrate nicely into the rest of my application, which uses the standard controls primarely. I therefore wanted my control to use the same...
3
by: =?Utf-8?B?U2hhdWxp?= | last post by:
Hi, I created a button with flat style appearance and with border size set to 0. When the button is in focus it gets a border. How can I get rid of the border? Thanks Shaul
23
by: cmcdermo | last post by:
I want to change the colour of a border around an image when a user clicks on the image. Not sure how to go about this, i have tried a few things but it doens't seem to work. here is my image....
4
by: active | last post by:
There are at least the following border styles: None FixedSingle Sizable
1
by: MarwaAlSagheer | last post by:
Hi, I have form with Picture box and button. Flat appearance of button is flat and Border style of Picture box is none. Problem is when window lost focus, there are white border appear around...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.