Changing radio button colors

When hovering over a radio button, how do you change the fill color of the radio button? The default appears to be a shaded orange, but I want the flexibility to change colors, as needed.
Any suggestions?
Thanks!
jason@jones

Try using the setBackground or setForeground methods. If that doesn't work, look through the docs for any other methods that change the color. If those don't work, look into writing a custom ui component, which is not trivial.

Similar Messages

  • Changing Radio button location

    Hi,
    http://apex.oracle.com/pls/otn/f?p=50508:6:
    On the page above, i would like to change the location of radio button from "top left" to "center bottom". Is it possible?
    I am using a static LOV for the generation of radio buttons
    STATIC2:<div class="radiolook"><img src=#WORKSPACE_IMAGES#Picture5.jpg width="200" height="200" /></div>;A,<div class="radiolook"><img src=#WORKSPACE_IMAGES#Picture6.jpg width="200" height="200" /></div>;B,<div class="radiolook"><img src=#WORKSPACE_IMAGES#Picture8.jpg width="200" height="200" /></div>;CThe css class code is
    .radiolook {
    margin:5px auto;
    padding:5px;
    font-size:12px;
    color:#096;
    text-align:left;
    vertical-align:top;
    border:1px #ffd700 solid;
    border-right:2px #096 solid;
    border-left:2px #096 solid;
    background-color:#ffffcc;
    }Please help..
    thank you
    VG
    Edited by: vg_2 on Nov 5, 2009 8:28 AM
    Edited by: vg_2 on Nov 5, 2009 8:28 AM

    Try:
    <style type="text/css">
    #P6_X table {
      margin-top: 10px;
    #P6_X td {
      height: 240px;
      vertical-align: top;
    #P6_X input, #P6_X label {
      display: block;
    #P6_X input {
      margin: 220px auto 0 auto;
      text-align: center; /* Because IE sucks */
    #P6_X label {
      margin-top: -240px;
    </style>Radio buttons are NOT nice things to style! None of the browsers seem to support padding on them, and height is all over the place as well.
    As the .radiolook CSS didn't seem to be applied on your example page I left it off in my experiments. You'll have to adjust the 240/220 values to accommodate the extra size introduced by its margins, borders and padding.

  • Still cannot change radio caption color by script

    Hello,
    I've been trying to follow advice seen in other threads when developers wanted to inactivate radio button choices by script, and also turn the caption grey. What I'm finding is I can deactivate the choice but I just cannot turn the caption grey.
    If the exclusion group is named "MyRadioChoice" and the choices are (say) "Choice1", "Choice2", "Choice3" and due to other user input Choice3 becomes inapplicable, then the wisdom is this should work:
    MyRadioChoice.Choice3.access = "readOnly";
    MyRadioChoice.Choice3.caption.font.fill.color = "192,192,192";
    The first statement works, the choice can no longer be clicked. But the second does not work, I just can't change the caption color. THe script does not throw any errors, it just plain doesn't work. Can anybody help?

    You were right. That problem was driving me crazy. Thank you for the solution.

  • Change pressed button Color

    Hi,
    I want to change my pressed button Color and I haven't been able to find a way, I tried creating my own button and add a listener when it is pressed and then change its background color but it doesn't work! it works for enter and exit but not for pressed and released.
    any one has an idea?
    thanks
    Here's my code:
    package components;
    import javax.swing.*;
    import java.awt.event.MouseEvent;
    import java.awt.event.MouseAdapter;
    import java.awt.*;
    * JButton con una nueva propiedad de Color presionado
    * @author Ana Mar�a Franco
    * @version 1.0
    public class PressedColorButton extends JButton
        // Atributos ************************************************************************
        private Color unpressedButtonColor;
        private Color pressedButtonColor;
        // Constructores ********************************************************************
        public PressedColorButton()
            super();
            this.addMouseListener(new PressedColorButton_this_mouseAdapter(this));
        // M�todos **************************************************************************
         * Obtiene el color sin presionar
         * @return Color
        public Color getUnpressedButtonColor()
            return this.unpressedButtonColor;
         * Define el color sin presionar
         * @param nuevoColor Color
        public void setUnpressedButtonColor(Color nuevoColor)
            this.unpressedButtonColor = nuevoColor;
         * Obtiene el color presionado
         * @return Color
        public Color getPressedButtonColor()
            return this.pressedButtonColor;
         * Define el color presionado
         * @param nuevoColor Color
        public void setPressedButtonColor(Color nuevoColor)
            this.pressedButtonColor = nuevoColor;
        public void this_mouseExited(MouseEvent e)
            this.setBackground(unpressedButtonColor);
        public void this_mousePressed(MouseEvent e)
            this.setBackground(pressedButtonColor);
        public void this_mouseReleased(MouseEvent e)
            this.setBackground(unpressedButtonColor);
        public void this_mouseEntered(MouseEvent e)
            this.setBackground(pressedButtonColor);
    // Escuchadores *************************************************************************
    class PressedColorButton_this_mouseAdapter extends MouseAdapter
        private PressedColorButton adaptee;
        PressedColorButton_this_mouseAdapter(PressedColorButton adaptee)
            this.adaptee = adaptee;
        public void mouseExited(MouseEvent e)
            adaptee.this_mouseExited(e);
        public void mousePressed(MouseEvent e)
            adaptee.this_mousePressed(e);
        public void mouseReleased(MouseEvent e)
            adaptee.this_mouseReleased(e);
        public void mouseEntered(MouseEvent e)
            adaptee.this_mouseEntered(e);
    }

    Swing related questions should be posted in the Swing forum. Try setting the following properties on the button:
    setContentAreaFilled( false );
    setOpaque(true);

  • Required Radio Button Colored Red in a Dynamic Form

    Hi again
    Okey, like the headline said, I've got some problems with required radio buttons right now. In static fields they have a border when they are required.
    In dynamic forms they neither have, nor get any border.
    I tried already:
    1) to make a border with script (unfortunatelly it takes in the text too and is much smaller than the normal required border and will include the text => looks really ugly)
    2) to paint a border with lines (unfortunatelly the box itself overlaps the border only for 0,02mm (couldn't fix it) and it looks damn ugly )
    3) Cut the text out, write it in a textfield instead and border the complete box (Best solution right now... though a lot of work and won't look very good either)
    Since I needed to change 25 of my forms to dynamic and all of them have some of those required radiobuttons in it, I would appreciate ANY solution that would look a little bit acceptable.
    Anybody has any other idea how to get such a border (or anything similar) for these boxes?
    Thanx already
    Lisa
    (PS.: I only use quadratic check-fields
    PPS.: Sorry to bother you in the last time that much... I really try )

    Sorry to say, but I think you got me a bit wrong.
    It's not the radiobuttons that got in my way, it is the way they are displayed. (A field to enter information and a text. If you refer with a colour in it and it is in a dynamic form both, the input part and the text will be highlighted.)
    I wanted to accomplish the following thing:
    Make some kind of radiobutton or checkboxfield where only the little input part is red highlighted (with a border or something).
    But neither in radiobuttons nor in checkboxes it works, does it?
    Therefor it is no use in using checkboxes I think. If I do wrap those into subforms and highlight those again, not only the input part will be highlighted but also the following text. (That's why I don't understand how subforms could be of any use )
    Right now I seperated the input part from the text and just highlighted the input field. Though it still doesn't look as good as I would like it to do.
    If I got you wrong plz say so I am a bit tired right now and my English gets worse ;D
    I'll have a closer look at those pages you suggested me on tuesday. (I'm a bit in trouble right now)
    Thanx for providing me with information though
    I'm allways greatfull to learn some new things ;D
    (Silly people (like me) just can't learn enough so they could hide how dump they are ;D )
    Byebye
    Lisa

  • Changing simple button color

    It would seem as if this would be simple, but I'm not finding
    any documentation.
    I have a map of the US. Each U.S. state is a simple button.
    I'd like to change the button fill color (and potentially, the
    outline color) in AS3. I've created the buttons in Flash, not in
    AS3 (just graphically). How do I change the button fill color?
    Sample code:
    function addButtonListeners(btnInstance:SimpleButton) {
    btnInstance.addEventListener( MouseEvent.ROLL_OVER,
    handleRollover);
    btnInstance.addEventListener( MouseEvent.ROLL_OUT,
    handleRollover);
    addButtonListeners(Montana);
    addButtonListeners(NewMexico);
    addButtonListeners(Washington);
    Montana._color = 0xA6CsDA; //doesn't work

    I also tried this code, but I'm getting the error message:
    Access of possibly undefined property rgb through a reference
    with static type flash.geom:ColorTransform.
    Source: color.rgb = 0x00ff00;

  • Changing radio buttons label

    Hello.
    How can I programatically change label of radio buttons?
    I have a radio group named test and 2 radio buttons named t1 and t2.
    I've tried to set labels with Set_item_property('t1', label, 'aaa'); I got FRM-41045. What am I doing wrong?
    Natasa

    Natasa,
    I tink that you don't have access to individual radio button labels because the radio group is the Forms iten that set item property operates on. The work around is to forget about setting the readio button labels within the Forms properties and to use Forms display items instead.
    Adjust the display label so that they become labels for the radio button and this should do it.
    Frank

  • Radio Button color

    Hi,
    When my program displays, the radio buttons are gray in color.
    Is there a way I can set just the circle to white without making the whole label display white?
    Thanks in advance.
    Carol.

    try this
         JPanel panel = new JPanel();
         JRadioButton button =  new JRadioButton("button");
         button.setBackground(Color.WHITE);
         button.setContentAreaFilled(false);
         panel.add(button);
         getContentPane().add(panel);
         setSize(200,200);
         setVisible(true);

  • Changing radio button property dynamically

    Hi,
    I decalred two blocks in selection screen named B1 and B2, each have 2 radio buttions.
    B1 has radio button named B1R1 and B1R2.
    B2 has radio button named B2R1 and B2R2.
    If i select B1R1 then B2R1 should be selected and B2R2 should be disabled(user should not able to select).
    If i select B1R2 then B2R2 should be selected and B2R1 should be disabled(user should not able to select).
    Can anyone please tell me how to do this.
    Thanks,
    Amal

    Hi
    Try this
    SELECTION-SCREEN: BEGIN OF BLOCK b1.
      PARAMETERS: b1r1 RADIOBUTTON GROUP g1 DEFAULT 'X' USER-COMMAND ucomm1,
                  b1r2 RADIOBUTTON GROUP g1.
    SELECTION-SCREEN: END OF BLOCK b1.
    SELECTION-SCREEN: BEGIN OF BLOCK b2.
      PARAMETERS: b2r1 RADIOBUTTON GROUP g2 USER-COMMAND UCOMM2 MODIF ID MD1,
                  b2r2 RADIOBUTTON GROUP g2 MODIF ID MD2.
    SELECTION-SCREEN: END OF BLOCK b2.
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
      IF b1r1 = 'X'.
        if screen-group1 = 'MD2'.
          screen-input = 0.
        endif.
      ELSEIF b1r2 = 'X'.
        if screen-group1 = 'MD1'.
          screen-input = 0.
        endif.
      ENDIF.
      MODIFY SCREEN.
      ENDLOOP.
      AT SELECTION-SCREEN.
        IF b1r1 = 'X'.
        b2r1 = 'X'.
        b2r2 = ''.
      ELSEIF b1r2 = 'X'.
        b2r2 = 'X'.
        b2r1 = ''.
      ENDIF.

  • Can you change the button color on a custom theme?

    I recently installed a nice theme called Fractal-01 Song of a morning breeze. I had to installan add-on to change the menus that were white and thus invisible, but I have not figured out how to get the grey buttons for like Home and Back and Reload black, and they are very hard to see with this theme.
    I tried changing them in Custom Theme Restorer, but nothing seems to change them to black. I can't imagine that the person who designed this theme would have made these washed out colors that blend into the theme the default, but maybe he or she did. It is a shame to give up on such a nice theme if I don't have to, but it helps if you can see your buttons.

    Hi sherylz,
    It is also possible to edit the theme, but it may be wise to make a copy of it:
    *[https://support.mozilla.org/en-US/questions/940165]
    *[https://developer.mozilla.org/en-US/Add-ons/Themes/Background MDN Reference]
    *Add on to make own skin: [https://addons.mozilla.org/en-Us/firefox/addon/bt-canvas/]

  • Radio Buttons only work after selecting another field

    In my Access 2010 database, I have an option group consisting of 3 radio buttons.  If I select the first button I Access will allow me, but if I then want to change my selection to the third button I can only do so if I select another field
    before I can make the button change.  Now, if I want to change my selection again from the third button to the second button, I must select another field then select the second button.
    I just can't figure out what is going on here.  Does anyone have any clue or explanation that will help me???  Thank you!

    I will add that originally this option group of radio buttons was working perfectly fine.  This issue surfaced when I included a tab control to the form and moved all the fields onto the first tab.
    It seems that having to select another field before changing a radio selection is limited when using the mouse; however, if I use any of the up/down or left/right arrow keys on the keyboard it will change radio button selections without selecting another field
    (as one would expect it to).
    Hi Eli,
    Probably it has something to do with the focus of the form (first tab) with the radio buttons. Someway that form looses focus when clicking a radio button. By selecting another field the form receives focus again, so you can use the radio buttons again.
    You can check it happens in this way.
    Imb.

  • Button Color

    Hi !
    My program endlessly scans a jTable of 150 row indexes in lenth.
    This jTable directly relates to 150 jButtons ... that depending on the status of thier function at any given time ... each change in color to reflect thier status. The buttons change in color 6 times ie; RED, GREEN, YELLOW,BLUE, GRAY or BLACK.
    Currently I change the button color in this way :
    import java.awt.Color;
    //import .*;
    * @author  Rick
    public class ButtonColorYellow {
        /** Creates a new instance of ButtonColorYellow */
        public ButtonColorYellow() {
            String  F0 = AddRFSwitchMain.jButton500.getText(); // Source of the Room Numbers that equate to the jButtons
              if (F0.equals("101")){
                AddRFSwitchMain.jButton101.setBackground(new Color(255,255,0)); // Yellow Color
            } if (F0.equals("102")){
                AddRFSwitchMain.jButton102.setBackground(new Color(255,255,0)); // Yellow Color
            } if (F0.equals("103")){
                AddRFSwitchMain.jButton103.setBackground(new Color(255,255,0)); // Yellow Color
            } if (F0.equals("104")){
                AddRFSwitchMain.jButton104.setBackground(new Color(255,255,0)); // Yellow Color
            } if (F0.equals("105")){
                AddRFSwitchMain.jButton105.setBackground(new Color(255,255,0)); // Yellow Color
            } if (F0.equals("106")){
                AddRFSwitchMain.jButton106.setBackground(new Color(255,255,0)); // Yellow Color
            } if (F0.equals("107")){
                AddRFSwitchMain.jButton107.setBackground(new Color(255,255,0)); // Yellow Color
            } if (F0.equals("108")){
                AddRFSwitchMain.jButton108.setBackground(new Color(255,255,0)); // Yellow Color
            } if (F0.equals("109")){
                AddRFSwitchMain.jButton109.setBackground(new Color(255,255,0)); // Yellow Color
            } if (F0.equals("110")){
                AddRFSwitchMain.jButton110.setBackground(new Color(255,255,0)); // Yellow Color
            } if (F0.equals("111")){
                AddRFSwitchMain.jButton111.setBackground(new Color(255,255,0)); // Yellow Color
            } if (F0.equals("112")){
                AddRFSwitchMain.jButton112.setBackground(new Color(255,255,0)); // Yellow Color
            } if (F0.equals("113")){
                AddRFSwitchMain.jButton113.setBackground(new Color(255,255,0)); // Yellow Color
            } if (F0.equals("114")){
                AddRFSwitchMain.jButton114.setBackground(new Color(255,255,0)); // Yellow Color
            } if (F0.equals("115")){
                AddRFSwitchMain.jButton115.setBackground(new Color(255,255,0)); // Yellow Color
            } if (F0.equals("116")){
                AddRFSwitchMain.jButton116.setBackground(new Color(255,255,0)); // Yellow Color
            } if (F0.equals("117")){
                AddRFSwitchMain.jButton117.setBackground(new Color(255,255,0)); // Yellow Color
            } if (F0.equals("118")){
                AddRFSwitchMain.jButton118.setBackground(new Color(255,255,0)); // Yellow Color
            } if (F0.equals("119")){
                AddRFSwitchMain.jButton119.setBackground(new Color(255,255,0)); // Yellow Color
            } if (F0.equals("120")){
                AddRFSwitchMain.jButton120.setBackground(new Color(255,255,0)); // Yellow Color
            } if (F0.equals("121")){
                AddRFSwitchMain.jButton121.setBackground(new Color(255,255,0)); // Yellow Color
            } if (F0.equals("122")){
                AddRFSwitchMain.jButton122.setBackground(new Color(255,255,0)); // Yellow Color
            } if (F0.equals("123")){
                AddRFSwitchMain.jButton123.setBackground(new Color(255,255,0)); // Yellow Color
            } if (F0.equals("124")){
                AddRFSwitchMain.jButton124.setBackground(new Color(255,255,0)); // Yellow Color
            } if (F0.equals("125")){
    ..................  etc, etc, etc   ( room numbers are used for index references ie: 101,102, 103, etc)This code works well , but would think there must be a better wat to code it.
    I will make the color itself a var like this:
    AddRFSwitchMain.jButton124.setBackground(new Color( a , b , c ));...... but is there any way to adress the JButtons themselves in a var way??
    ie:
    AddRFSwitchMain.jButton( var X ).setBackground(new Color( a , b , c ));I know ya cant change the jButton lable itself ... but any way to reference the buttons in a like fashion ??
    THANKS !!

    You currently are creating 150 separate buttons each
    independent and unrelated to each other. I would
    reccomend creating an two arrays, one of buttons, and
    another of button status which you can then loop
    thorugh and change with logic
    Something like this:
    Button[] myButtonArray
    int[] myButtonStatus
    init() {
    Button[] myButtonArray = new Button[150];
    int myButtonStatus = new int[150];
    for (int i = 0; i < 150 ; i++)
    myButtonArray[i] = new Button("Button #" +
    n #" + (i + 1) );
    myButonStatus[i] = ** Get Status from
    tus from jTable
    then in Main Code soemthing like
    for (int i=0 ; i < 150 ; i++)
    if (myButtonStatus = 101) then
    ) then
    {myButtonArray.setBackGround(Color.Yellow);
    if (myButtonStatus = xyz ) then
    {myButtonArray[i].setBackGrondr(Color.Black);
    Hope this helps
    JavaPython ....
    Does not your code snip make for 150 lines of code entry listed below? : (
    if (myButtonStatus = 101) then
    ) then
    {myButtonArray.setBackGround(Color.Yellow);
    if (myButtonStatus = 101) then
    ) then
    {myButtonArray.setBackGround(Color.Yellow);

  • How to change the button colour automatically????

    i want to change the button color automatically ,if there is no data in next page ....plzz help

    Hi,
    create a binding for the data collection displayed on next page and do
    styleClass=#{bindings.iterator.estimatedRowCount<=0?'redClass' : ''}
    Then define a custom skin (see how to skin an application in the web developer guide) and use
    .redClass .af|commandButton{background-color:red}
    in this skin. Now when the page renders or when you PPR the button, the color should apply or not. Btw, the same EL on the disabled property or the rendered property would do the same trick (probably better than just a color change)
    Frank

  • How to create a radio button that changes colors

    I'm using Acrobat X and ID CS5 on Mac OS X.
    A couple of years ago someone on the forums explained to me how to create a button that changes color with each click. You can view a sample PDF at https://dl.dropboxusercontent.com/u/52882455/colorcycle.pdf. They gave me the document JS and showed me how to set the properties of the button. I've integrated the button into a particular series of PDF forms and it's worked out very well.
    Now I would like to do the same thing, but using a circle instead of a square. Can anyone tell me the best way to do this? Can I somehow set a radio button to cycle through colors in the same way? I design my forms initially in ID CS5 and then activate and format the fields in Acrobat X. I've tried using circles instead of squares in my ID document, but when I export to an interactive PDF, they're converted to squares.
    Any ideas?

    I understand how to make buttons cycle through colors-- the problem I'm having is that I'm trying to figure out how to make a circular button cycle through colors. When I export my ID document to PDF, my round button maintains it's original appearance, but when I click on it to cycle through the colors, it behaves like a square (see new PDF at https://dl.dropboxusercontent.com/u/52882455/colorcycle2.pdf).
    If I use a radio button, I can get it to cycle through colors, but I don't want it to have a black dot in the middle. Is there a way to format the radio button to not show the black dot when clicked?

  • Skin or change color of selected radio button or selected checkbox

    I'm creating a custom CSS and I want to change the color of the checkmark (or the icon used) for selected radio buttons/checkboxes. Right now it's green (because it's using the simple stylesheet) but I don't know what element I can use to change the color or skin it. I've tried the af:selectBooleanCheckbox and af:selectBooleanRadio (even though they say they are only for disabled and read-only) but they don't appear to do anything... what do I use?

    Have a look at
    http://www.oracle.com/technology/products/jdev/htdocs/partners/addins/exchange/jsf/doc/skin-selectors.html
    Searh e.g for
    af:selectBooleanCheckbox Component
    to learn how to work with custom images
    Frank

Maybe you are looking for

  • How can I get the mouse cursor from acrobat reader to use in other windows programs?

    I like the pointer used in Adobe's Acrobat Reader and would like to use it as my regular mouse pointer. A friend and I were able to do it years ago, but I can't now. I am using Windows XP Home Edition. Resveratrol

  • Automatic Deletion of Files in FRA

    Ok, I am about fired up right now. I have read over and over how Oracle will reclaim space in the FRA if it is running low yet I can't reproduce this behavior to save my life. - I have archive logging enabled. - I am using the FRA. - I have a recover

  • PowerMac to MacPro Migration

    I am finally migrating from a PowerMac G5 to a MacPro. Like most people, my time is short and I'd like to hit the ground running. First, note that I didn't buy my MacPro at Apple, so I'm unable to take part in the file migration that Apple offers. My

  • Having trouble with iPhone 5 camera shutter not opening

    Any ideas what I can try. Sometimes it works and other time the shutter locks up.

  • Exception runnig a application

    Hi... I am develop a small test application using fusion web application wiht ADF and Jdeveloper 11g, but I have un error message when run a simple page. This is the error: oracle.jbo.JboException: JBO-29000: Unexpected exception caught: java.sql.SQL