Solved

Blue outline around disabled widgets is inconsistent

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Visual xHarbour 1 77
bigHeights  challenge 13 56
ClickOnce Install - Shortcut Question 3 59
Java Loop 4 22
Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

747 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now