Solved

Blue outline around disabled widgets is inconsistent

Posted on 2006-07-10
6
245 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
  • 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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

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

Suggested Solutions

Title # Comments Views Activity
detecting  the added row index in a datagridview 3 80
simplest php form 3 81
sp_configure 'external scripts enabled', 1; 7 78
Create .bat File 16 34
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
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?
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …

860 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