I need to create two custom radio buttons, one with a green center and one with a red center. I have created custom panel widgets for the Profound UI before, but I was able to copy the graphic pieces from the Profound UI images folder to get me started. I can't seem to find any radio button graphics or documentation on creating a radio button widget using Profound UI. I would appreciate any help or guidance with this.
Thanks!
Denise
Custom Radio Button Widget
-
- New User
- Posts: 3
- Joined: Mon Mar 19, 2012 1:41 pm
- First Name: Denise
- Last Name: Bradley
- Company Name: Baker College
- City: Flint
- State / Province: Michigan
- Contact:
- David
- Profound Logic Staff Member
- Posts: 690
- Joined: Fri Jan 04, 2008 12:11 pm
- First Name: David
- Last Name: Russo
- Company Name: Profound Logic Software
- Contact:
Re: Custom Radio Button Widget
I think there is not an easy way to accomplish this. PUI's radio button widget uses the browser's built-in radio button control for the widget, which doesn't allow for any styling of the "center" component.
That said, though, can you explain a bit more of what you are trying to accomplish? Maybe we could recommend some alternatives.
That said, though, can you explain a bit more of what you are trying to accomplish? Maybe we could recommend some alternatives.
-
- New User
- Posts: 3
- Joined: Mon Mar 19, 2012 1:41 pm
- First Name: Denise
- Last Name: Bradley
- Company Name: Baker College
- City: Flint
- State / Province: Michigan
- Contact:
Re: Custom Radio Button Widget
We have a page with a list of items that a student may be missing. Each item has multiple radio buttons to indicate whether 1) nothing needs to be done with this item, 2) it is complete, 3) it is incomplete, or 4) nothing has been turned in yet. We would like the first two buttons to show green when they are displayed, to indicate at a glance that these items are okay. The next two buttons should display red to indicate that something more has to be done with these items. After looking through the PUI javascript, it looked as though they were being generated from the code and not from graphics, as some of our other custom widgets are, but I just wasn't sure. If I created a radio button graphic, is there some way that we can add it to our PUI and use it on our pages as a custom widget?
Thanks for your help!
~ Denise
Thanks for your help!
~ Denise
- David
- Profound Logic Staff Member
- Posts: 690
- Joined: Fri Jan 04, 2008 12:11 pm
- First Name: David
- Last Name: Russo
- Company Name: Profound Logic Software
- Contact:
Re: Custom Radio Button Widget
Yes, as you saw, the radios are not rendered using image files. PUI uses just a standard HTML <input> control with type "radio".
Unfortunately, the browser does not give the capability to style these very much -- for example, you cannot use image files with them at all, nor can you just change the color of the center.
You may have seen "fancy" or "styled" radio buttons out there, but these are actually created using some HTML/CSS "tricks" where some other HTML element (to which you can assign a background image) is used to "wrap" the radio. Then JavaScript code is used to swap out the image on the "wrapper" element when you click on it to check/uncheck the box. For example, like this:
http://ryanfait.com/resources/custom-ch ... o-buttons/
Unfortunatley, though, due to the way the radio is constructed in PUI using just a standard <input> element, it is not currently possible to style them in this way.
We'll take this into consideration and may make some improvements here in the future.
In the meanwhile, maybe some other presentation can be used? Maybe using colored image files or labels?
Unfortunately, the browser does not give the capability to style these very much -- for example, you cannot use image files with them at all, nor can you just change the color of the center.
You may have seen "fancy" or "styled" radio buttons out there, but these are actually created using some HTML/CSS "tricks" where some other HTML element (to which you can assign a background image) is used to "wrap" the radio. Then JavaScript code is used to swap out the image on the "wrapper" element when you click on it to check/uncheck the box. For example, like this:
http://ryanfait.com/resources/custom-ch ... o-buttons/
Unfortunatley, though, due to the way the radio is constructed in PUI using just a standard <input> element, it is not currently possible to style them in this way.
We'll take this into consideration and may make some improvements here in the future.
In the meanwhile, maybe some other presentation can be used? Maybe using colored image files or labels?
Who is online
Users browsing this forum: No registered users and 5 guests