Link to home
Start Free TrialLog in
Avatar of TravisMS
TravisMS

asked on

Blue outline around disabled widgets is inconsistent

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!
Avatar of bpmurray
bpmurray
Flag of Ireland image

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>
Actually, it should be restricted to disabled input elements:
<style type="text/css">
     input:disabled {
          border-width:0;
     }
</style>
Avatar of TravisMS
TravisMS

ASKER

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

Thanks!
ASKER CERTIFIED SOLUTION
Avatar of bpmurray
bpmurray
Flag of Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial