• 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

How to change the inner color of a CheckBox

 
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi guys,

I need a tri-state check box. The scenario is like this...

All checkBox

option1 checkBox

option2 checkBox

option3 checkBox

Assume the above are checkboxes. Here if I check any one of the option checkboxes then All checkbox should checked automatically but with gray background color. If all the options are checked then All should be checked and it should be in normal mode. If everything is unselected then All checkbox should get unselected.

I did in the following way.

But I don't know how to change the inner color of checkbox. It is only changing the outer color.



Please give me your suggestions.

Thanks
 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

We had a simialr req of tri state checkbox in our app and we had implemented the same using a checkbox image filled with light gray color.

Whenever you want to display the filled in checkbox, you can hide the actual checkbox and display the checkbox image.

Try it out.
 
Mahendran Aiyappan
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Venkata Rajesh,

Thanks for your quick response.

My Question is even I use an image based checkbox still I should click it for select all or unselect all option. Is it possible?


Thanks
 
Venkata Rajesh
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yeah. You can still do tht. Write an onclick event for the image and you can display the image or the checkbox accordingly in your script.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic