I had 4 Yes/No questions using Radio Buttons.
In v9, I can easily change them to Button Group.
I like this new style...
Would be nice to look like this (simple CSS tweak), Except, the NO should be Red, not green.
I cannot find a way using only CSS (ie. no JS Render Script) to style the YES green, and NO red.
I understand its tough, because its not just a Yes/No switch - it can be any number of options in the group.
Bruce mentioned trying a Presentation rule, but all that does is color the entire object:
So close but yet so far.
Cannot color Yes/No Button Group like I want
Cannot color Yes/No Button Group like I want
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.
Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Aware Programming & Consulting - Tampa FL
Re: Cannot color Yes/No Button Group like I want
I am fairly sure this is possible using only CSS but it will not be an easy or clean fix. The thing is, you have to find a way to uniquely select each button or groups of buttons and I would recommend you dig into the CSS documentation on selectors. Your best bet is using the label i.e use the unique label name in the selector (or cell id/class if you can set that in some way. I am not in front of a computer and can't remember the AwareIM settings etc.) and then also use in your selector something like select next div (or whatever HTML element the button is) after the label (or a trick is writing the label name as a span with an id e g <span id='btn1'>Label</span> and then use the id in the next div selector). The next div thing is just one thing/selector you can use, you have a bunch more you can use.
Another non clean and messy solution is using separators i.e 1 separator per button and then have a class or id in the seperator changing the style of the button.
PS: There is most likely a better and "proper" way to do this directly via KendoUI and scripts so is what I would look at first because the CSS route is a huge and complex rabbit hole . Another thing is, in UI like this e.g 2 buttons with different colors or states, you most often have 2 different classes you can manipulate to change things related to 1 button so it wouldn't surprise me if that also is the case in KendoUI but it is maybe tricky to find the classes or find how the style to each button is applied.
Another non clean and messy solution is using separators i.e 1 separator per button and then have a class or id in the seperator changing the style of the button.
PS: There is most likely a better and "proper" way to do this directly via KendoUI and scripts so is what I would look at first because the CSS route is a huge and complex rabbit hole . Another thing is, in UI like this e.g 2 buttons with different colors or states, you most often have 2 different classes you can manipulate to change things related to 1 button so it wouldn't surprise me if that also is the case in KendoUI but it is maybe tricky to find the classes or find how the style to each button is applied.
Henrik (V8 Developer Ed. - Windows)
Re: Cannot color Yes/No Button Group like I want
I’m surprised you think that I wouldn’t have already checked all that out.hpl123 wrote: ↑Sat Apr 06, 2024 8:35 pm I am fairly sure this is possible using only CSS but it will not be an easy or clean fix. The thing is, you have to find a way to uniquely select each button or groups of buttons and I would recommend you dig into the CSS documentation on selectors. Your best bet is using the label i.e use the unique label name in the selector (or cell id/class if you can set that in some way. I am not in front of a computer and can't remember the AwareIM settings etc.) and then also use in your selector something like select next div (or whatever HTML element the button is) after the label (or a trick is writing the label name as a span with an id e g <span id='btn1'>Label</span> and then use the id in the next div selector). The next div thing is just one thing/selector you can use, you have a bunch more you can use. .
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.
Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Aware Programming & Consulting - Tampa FL
Re: Cannot color Yes/No Button Group like I want
Most things can be done with CSS and I have done similar things in the past so I still think this is possible. Send me a login via PM and I can take a stab at it . I only need the web view and could be to a temporary VP i.e I don't need server access.Jaymer wrote: ↑Sat Apr 06, 2024 11:51 pmI’m surprised you think that I wouldn’t have already checked all that out.hpl123 wrote: ↑Sat Apr 06, 2024 8:35 pm I am fairly sure this is possible using only CSS but it will not be an easy or clean fix. The thing is, you have to find a way to uniquely select each button or groups of buttons and I would recommend you dig into the CSS documentation on selectors. Your best bet is using the label i.e use the unique label name in the selector (or cell id/class if you can set that in some way. I am not in front of a computer and can't remember the AwareIM settings etc.) and then also use in your selector something like select next div (or whatever HTML element the button is) after the label (or a trick is writing the label name as a span with an id e g <span id='btn1'>Label</span> and then use the id in the next div selector). The next div thing is just one thing/selector you can use, you have a bunch more you can use. .
Henrik (V8 Developer Ed. - Windows)