• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

setEnabled (false) doesn't work

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
folks
I've got a problem and I'm stumped. I have 2 snippets of code (they are checkboxes) and when checked, should disable another checkbox.
The problem is, only one of them works. I've looked at the code a hundred times and can't figure it out.
Also, in a perfect world unchecking the box would "un-gray" the other option. That doesn't work, but I was able to add code to the reset button which will enable all checkboxes.
Please take a look and offer any advice you can.
 
Matthew Helling
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ok, I found the bug, this is really weird.
Because in my server declarations I never had Email Server = false, the code wouldn't run for checking the box. once i set one of the server objects to false, it started working.
goofy. hope someone learns something.
I could still use some help un-graying boxes if anyone has any ideas. When I uncheck the box, it "Undos" the other effects, but not the setEnabled (false).

matt
[ March 24, 2004: Message edited by: Matthew Helling ]
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Instead of using setEnabled( false ), you could base the boolean value off whether the current checkbox is checked. After you're finished with all the tests, have something like this -


[ March 25, 2004: Message edited by: Nathan Pruett ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic