Solved

Blue outline around disabled widgets is inconsistent

Posted on 2006-07-10
6
246 Views
Last Modified: 2010-05-18
Hi!

When you disable a textbox on a Windows form, the background goes to gray and the outline remains blue. For other widgets such as ComboBoxes and CheckBoxes though, the outline disappears. This makes a form look a little "unkempt". Does anyone know how to either dump the blue outline in a TextBox, or enable the blue outline for other widgets? We can go either way, it just needs to be consistent. Thanks!
0
Comment
Question by:TravisMS
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
6 Comments
 
LVL 15

Expert Comment

by:bpmurray
ID: 17075551
If there's a blue border around the input box, you can remove it using styles. You can do it per component:
   <input type="text" style="border-width:0;" ...

Alternatively, you can set it in the styles section, where it'll change ALL input elements, not just text:
<style type="text/css">
      input {
            border-width:0;
            border-width:0;
      }
</style>
0
 
LVL 15

Expert Comment

by:bpmurray
ID: 17075906
Actually, it should be restricted to disabled input elements:
<style type="text/css">
     input:disabled {
          border-width:0;
     }
</style>
0
 

Author Comment

by:TravisMS
ID: 17100313
This is a Windows form project though, not an ASP form. Is there anyway to do this in a Windows app?

Thanks!
0
 
LVL 15

Accepted Solution

by:
bpmurray earned 125 total points
ID: 17102142
As far as I know, this has to be done atthe individual control level. I know you can set the margins - I think the default is 3 - but if you set the control's BackColor, you can adjust the style. I don't know if that will resolve the issue, but I've never run into this before.

Hope this helps a little.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is an explanation of a simple data model to help parse a JSON feed
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question