Solved

Blue outline around disabled widgets is inconsistent

Posted on 2006-07-10
6
247 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

What Is Transaction Monitoring and who needs it?

Synthetic Transaction Monitoring that you need for the day to day, which ensures your business website keeps running optimally, and that there is no downtime to impact your customer experience.

Question has a verified solution.

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

This is about my first experience with programming Arduino.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

728 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