Win a copy of Fixing your Scrum this week in the Agile forum!
  • 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
  • Ron McLeod
  • Paul Clapham
  • Rob Spoor
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Holloway
  • Piet Souris
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Himai Minh

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.
 
Tell me how it all turns out. Here is a tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic