Change Highlight Selection Color

The default color when a cell or item is selected is a light cyan. On my computer it is very hard to discern text because the light cyan highlight color and the white text run together. How can I adjust the highlight/selection color so that text is legible?

The selected item color is actually determined by your OS. To change it in Windows XP:
Right click on your desktop
Properties
Appearance Tab
Advanced
Item Drop down: Chose "Selected Items"
Change the color to whatever you like

Similar Messages

  • How can I change the 'selected' color of one JToggleButton only.

    Hi,
    This seems like a simple / trivial question, but I just can't figure it out. Is there a way that I can create a JToggleButton and change the selected color of only that JToggleButton.
    I'm trying to create a simple sidebar like component for navigation within my app. A group of JToggleButton[s] added to a ButtonGroup (with the proper layout / sizing) works great, but the default JToggleButton colors don't suit my needs. I know that I can change the colors using the UIManager / UIDefaults, but I don't want to change the defaults for every JToggleButton in my app. I only want to change the defaults for a few select JToggleButton[s].
    For example, I can do this:
    UIManager.put("ToggleButton.select", UIManager.getColor("Table.selectionBackground"));
    UIManager.put("ToggleButton.background", UIManager.getColor("Table.background"));but I'd rather do something like this:
    JToggleButton jtb = new JToggleButton("Toggle Button Text");
    jtb.setSelectedColor(UIManager.getColor("Table.selectionBackground"));
    jtb.setBackground(UIManager.getColor("Table.background"));The only thing is, I can't find any method that is the equivilant of 'setSelectedColor(Color)' for JToggleButton.
    I know I could do it by adding some listeners to the JToggleButton[s], but that seems a little complicated for something like changing a color.
    I'd also seen a solution in the forums where someone had extended the ButtonUI of the pluggable look and feel they were using. I'm not interested in modifying the look and feel I'm using. As far as I'm concerned, that would defeat the purpose of having a pluggable look and feel as I would have to duplicate my efforts for every look and feel I want to use.
    Any help would be appreciated,
    Ryan

    try this
    import javax.swing.*;
    import java.awt.*;
    class Testing extends JFrame
      public Testing()
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        setSize(250,75);
        setLocation(400,300);
        JPanel jp = new JPanel();
        JToggleButton jtb = new JToggleButton("Toggle me");
        jtb.setUI(new MyUI());
        jp.add(jtb);
        getContentPane().add(jp);
      public static void main(String args[]){new Testing().setVisible(true);}
    class MyUI extends javax.swing.plaf.metal.MetalToggleButtonUI
      public Color getSelectColor(){return Color.BLACK;}
    }

  • Changing highlight text color / using Highlighters

    I've subclassed JTextArea, and among other things, am trying to add the functionality for drawing the active selection even when the TextArea doesn't have focus. I've overridden processFocusEvent like so:
    public void processFocusEvent(FocusEvent e){
            Highlighter h = this.getHighlighter();
             if (e.getID() == e.FOCUS_GAINED){
                //remove the inactive highlight
                h.removeAllHighlights();
            //this will put the selection highlight back in for us, among other things,
            //if we just gained focus.
            super.processFocusEvent(e);
            //now add the inactive-selection highlight if we just lost focus
            if (e.getID() == e.FOCUS_LOST){
                try {
                    h.addHighlight(
                            this.getSelectionStart(),
                            this.getSelectionEnd(),
                            new DefaultHighlighter.DefaultHighlightPainter(
                                new Color(212,212,212)
                } catch (Exception ex){
                    ex.printStackTrace();
        }and it works quite nicely. Notice that I draw the inactive selection gray.
    There's a slight problem with this: JTextArea doesn't treat the text in the highlighted section any differently, as opposed to how it would when the component is focused (i.e. rendering it in the highlighted text color). I'm guessing this is because it knows that it's not focused, and therefore assumes that there's no highlighting to be drawn. So as a result, all text in the text area is rendered in the same color --- the foreground color --- when the textArea doesn't have focus, regardless of what is being highlighted. For this reason, setSelectedTextColor() has no effect.
    But I want to be able to change the highlighted text color, since, in theory, the user's system could be configured to show text in the exact same gray that I'm highlighting with. I want to just be able to set it to be white or black.
    I am rather averse to using a TextPane, since what I'm writing is designed to edit plain text, and a TextArea has many wheels that I don't want to reinvent, like setTabSize(), for example.
    Clearly, there is code already in place somewhere to draw text a different color for highlighted portions of a TextArea. Is there some way I could perhaps trick only the drawing code into thinking that it has focus? What is the cleanest way to accomplish what I want, i.e. the way that involves rewriting the least amount of functionality?
    Any suggestions/leads would be greatly appreciated.

    Here's a better way to keep the selection visible. All those hard-coded colors are a big no-no, but this is just to demonstrate the technique.
    import java.awt.Color;
    import javax.swing.text.DefaultCaret;
    import javax.swing.text.Highlighter;
    import javax.swing.text.DefaultHighlighter;
    * usage:
    * textComponent.setCaret(new GhostCaret());
    public class GhostCaret extends DefaultCaret
      private static final Highlighter.HighlightPainter unfocusedPainter =
          new DefaultHighlighter.DefaultHighlightPainter(new Color(230, 230, 210));
      private boolean isFocused;
      protected Highlighter.HighlightPainter getSelectionPainter()
        return isFocused ? SimpleHighlighter.defaultPainter : unfocusedPainter;
      public void setSelectionVisible(boolean hasFocus)
        if (hasFocus != isFocused)
          isFocused = hasFocus;
          super.setSelectionVisible(false);
          super.setSelectionVisible(true);
          getComponent().setSelectedTextColor(isFocused ? Color.WHITE : Color.BLACK);
    }

  • JPopup selection of menuitems: how to change the selection color?

    Greetings =)
    I dont want the items of my JPopup to be highlighted blue, is there a way to set the selection color for JPopup or MenuItem to a custom color ?

    U can use
    javax.swing.plaf.basic.BasicMenuItemUI for making your own UI for menu item
    then set this UI through this method:
    setUI(MenuItemUI ui) of JMenuItem

  • Change highlight word color in a report

    Hi All,
    I have question regarding highlighting search words in a report. I used APEX's "Highlight Words" column attribute to achieve this. My search string is a list of words 'table,chair,sofa' It works perfectly fine showing the matching words in Red color. But I want to change the color to yellow. If it's a single word then I think I can do it using the replace SQL function and change the color using the <span Style...> But in my case I have a list. Any advise appreciated...
    Thanks in advance.

    Another option would be to include relevant SQL to do your highlighting. E.g.
    select replace(replace(object_name,'table','&lt;span style="background-color:yellow"&gt;table&lt;/span&gt;'),'chair','&lt;span style="background-color: yellow"&gt;chair&lt;/span&gt;') object_name from bits_of_furniture
    It's certainly not pretty but the above would highlight all tables and chairs in yellow. What you could do is put together a PL/SQL function which accepts as parameters: the string to make replacements in, a comma-separated list of terms to replace and the colour to highlight with. So your SQL might become:
    select highlight(object_name,'chair,table,sofa','yellow') from bits_of_furniture
    All you have to do is build the highlight() function... :)
    Andy

  • Changing lead Selection Color

    Hello,
    After applying themes which property do i need to to change so that the color of the row will change from from dark yellow to some light color when ever i select that perticular record
    in table UI Element.
    Thanks & Regards
       Kiran

    Hi,
    Use
    node.setLeadSelection(x)
    regards
    Ayyapparaj

  • Change Button selection color

    Hay Guys,
    Is there a way to change a button's background color using UIManager when it is presses or selected ?
    Thanks a lot,

    hi,
    UIManager.put("Button.foreground", new ColorUIResource(new Color(26,67,92)));.
    thanks
    daya

  • Change selective color(pixels) of an image.

    I want to change the selective color of an image to another desired color. I want to this in pixel's scope. If there is an image with three colors red(FF0000), green(00FF00) and yellow(FFFF00); in this case i want to change the color of red to blue, then the program should change all red pixels to blue(0000FF).
    I have to do this in an applet. Till date, i tried to implement the library function getRGB and setRGB but failed to do it completely.
    Any help (algorithm, approach, or code) will be appreciated.
    Thanks

    Use the class RGBImageFilter. The API documentation has an example of use.
    http://java.sun.com/j2se/1.5.0/docs/api/java/awt/image/RGBImageFilter.html

  • Selection Color of JSlider

    I am making a GUI for a little software game.
    But i have a problem with my slider. I want to change the selection color from the tumb from the standard "beautiful" purple to another color.
    I've tried following settings , with UIManager.put("Slider.background",new ColorUIResource(Library.SETCOLOR)):
    Slider.background
    Slider.focus
    Slider.foreground
    Slider.highlight
    Slider.horizontalThumbIcon
    Slider.majorTickLength
    Slider.shadow
    Slider.trackWidth
    Slider.verticalThumbIcon
    SliderUI
    Slider.border     
    Slider.focusInsets     
    None of these settings worked.
    I also tried all the settings listed on the following URL :
    http://forums.e-plus.com.au/thread.jsp?forum=3&thread=93
    But they did'nt work either.
    Please help me out??

    Look in the documentation in the styles section.
    Sincerely,
    Michael
    El 15/05/2009, a las 5:26, kRizzl0r <[email protected]> escribió:
    >
    hi there,
    >
    i was wondering why the TextField's selection color in AIR is 
    different from the one in the flashplayer - and if there is a way to 
    change it?
    who chose a grey tone as highlight color, and an even lighter grey 
    when the TextField lost its focus? seems like a strange decision to 
    me..
    >
    cheers
    >

  • Selection Color of a text box

    As one of the project requirements, I have to provide a
    functionality in my application to be able to change the selection
    color of the text box. Having no provision in Flash, I searched on
    the net and found one good example of doing that with
    flash.geom.ColorTransform and TextFormat classes. It works fine
    with windows. However, it doesn't work on Mac OSX. I am using Flash
    8 with AS 2.0 for development.
    I am seeking some support from all the brilliant developers
    here. Can somebody help me with a solution to this problem?

    Create 4 radio buttons, all called the same name, but with export values of cent.grn, cent.amb, cent.red, cent.blk.
    Then use this as the custom calculation script for the text field:
    var v = this.getField("myRadioButtons").value;    //Replace myRadioButtons with the name of your radio button group
    if (v=="cent.grn"){
    this.getField("tf.assmnt.stat").fillColor = color.green;    
    else if (v=="cent.amb"){
    this.getField("tf.assmnt.stat").fillColor = [ "RGB", 1,.5,0 ];
    else if (v=="cent.red"){
    this.getField("tf.assmnt.stat").fillColor = color.red;
    else if (v=="cent.blk"){
    this.getField("tf.assmnt.stat").fillColor = color.black;

  • Setting JToggleButton's select color a real pain - any suggestions?

    Hi,
    I'm starting to get a bit frustrated trying to set the select color of a JToggleButton. I feel like I've wasted hours on something that should be a one liner, so I figured it's time to ask for help (again).
    I'm trying to create a very simple panel of about five toggle buttons, in a ButtonGroup, with a grid layout (1 column, 5 rows). Basically I want to create a little navigation panel that resembles the left side of the preferences dialogs in Firefox / Thunderbird (if you've seen it). However, I'm having trouble setting the select color of the toggle buttons. I know it's possible to set the color using the UIManager / UIDefaults (I don't use orange, it's just an example)...
    UIManager.put("ToggleButton.select", Color.ORANGE);... but I don't want to change the select color for every toggle button in my application.
    I've also seen posts that recommend extending the ButtonUI of the look and feel that is being used. I don't think this is a good solution because I don't intend to extend the ButtonUI of every look and feel I want (or may want) to use.
    Although I try to be picky about using quality code that is reusable, I'm at the point where I'm pretty much willing to use anything that will work, no matter how ugly. If you want to share in my frustration, try the following:
    Create a tiny app with two JToggleButtons. Label one of them "Go" and the other "Stop". Add the Go and Stop buttons to a button group so that only one may be selected at a time. Make it so when the Go button is pushed it toggles on and is green. Make it so when the Stop button is pushed it toggles on and is red.
    In fact, here's a quick hack of my tiny application. Just modify it to set the select color of stop to red and the select color of go to green.
    import javax.swing.*;
    import java.awt.*;
    public class StopAndGo
         public StopAndGo()
              JFrame mainFrame = new JFrame("Stop And Go");
              JPanel contentPanel = new JPanel(new FlowLayout());
              JToggleButton stopButton = new JToggleButton("Stop");
              JToggleButton goButton = new JToggleButton("Go");
              ButtonGroup group = new ButtonGroup();
              group.add(stopButton);
              group.add(goButton);
              contentPanel.add(stopButton);
              contentPanel.add(goButton);
              mainFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              mainFrame.add(contentPanel);
              mainFrame.pack();
              mainFrame.setVisible(true);
         public static void main(String[] args)
              SwingUtilities.invokeLater(new Runnable()
                   public void run()
                        new StopAndGo();
    }As far as I'm concerned setting the select colors shouldn't be more than two 'setSelectColor(Color.SOMETHING)' lines. After all, one of the first things anyone will tell you about a toggle button is that it changes colors when it's pushed on.
    BTW, I'm using Java 1.5 on Linux.
    Thanks in advance for any help,
    Ryan

    This is a problem with the way the look and feels work and the simplest solution is to bypass it altogether.
    The code below takes each button and uses some GIFs to define what the icons are for the buttons. One is for the normal Icon for the button and the other is for when the button is selected.
    You can create your own GIFs with the colours you want. So a Red Stop button selected icon and a green go button selected icon. Two not selected icons are need to show the button when it is not pressed.
    Using the border just stops the normal button being drawn. Just the icon is seen.
    import javax.swing.*;
    import java.awt.*;
    public class StopAndGo
         public StopAndGo()
              JToggleButton stopButton = new JToggleButton("");
              JToggleButton goButton = new JToggleButton("");
              JFrame mainFrame = new JFrame("Stop And Go");
              JPanel contentPanel = new JPanel(new FlowLayout());
              ButtonGroup group = new ButtonGroup();
        stopButton.setSelectedIcon(new ImageIcon("whiteCross.gif"));
        stopButton.setIcon(new ImageIcon("blackCross.gif"));
        stopButton.setBorder(BorderFactory.createEtchedBorder());
         goButton.setSelectedIcon(new ImageIcon("whiteCircle.gif"));
        goButton.setIcon(new ImageIcon("blackCircle.gif"));
        goButton.setBorder(BorderFactory.createEtchedBorder());
              group.add(stopButton);
              group.add(goButton);
              contentPanel.add(stopButton);
              contentPanel.add(goButton);
              mainFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              mainFrame.add(contentPanel);
              mainFrame.pack();
              mainFrame.setVisible(true);
         public static void main(String[] args)
              SwingUtilities.invokeLater(new Runnable()
                   public void run()
                        new StopAndGo();
    }

  • How to change highlight color in Pages for iPad?

    Is there any way to do this? I know i can highlight selected text, but there is no option for choosing the color. It's always yellow and I would really like to highlight my text with many different colors.

    It looks like the Highlight (background) color can only be yellow.
    The best work around I can find is to change the text color itself which may work like a highlight of the text (like red, green or blue) which makes it stand out.  Maybe that will help?
    Format Inspector (the brush) > Style > Touch the Size and Font item > Color > swipe to see options.
    Note even there you can't go beyond predefined colors but you can make text stand out.
    ivan

  • Changing the hightlight color for all existing highlighted text

    Is there a quick way to change the hightlight color of all existing highlighted text in a document? Thanks.

    Never mind I found it. Open the Comment panel, select all existing comments, right-click and select Properties, change to your desired setting, click OK.

  • Changing Selection Color in Word 2013

    When working with Word 2013, when I want to select a word or sentence, anything really, I often have trouble seeing exactly what I am selecting.  I think this is because the page is, of course white, but the selection is only a very light grey. 
    To be clear, I am not talking about highlighting, that is a different feature.  When I select text in the box I am writing in now, for example, the text is highlighted in blue and the text turns white.  In Word, however, the text remains black and
    the highlight is a light grey.  Even in changing my brightness settings, it remains almost impossible to see.  Is there a way to change the color of the selection?

    Hi,
    Thanks for your post. Unfortunately, the text selection color cannot be changed currently.
    I have collected the information and submitted it through our internal channel, you can also submit a Feature Request by yourself via Microsoft Support
    (Please note that no charges will apply but you might need to supply credit card information to get it registered):
    http://support.microsoft.com/select/default.aspx?target=assistance
    Our developers strive to capture Microsoft users' ideas and are working hard to create a more powerful and easy-to-use product.
    Thanks,
    Ethan Hua CHN
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • How to change highlight color for menus?

    What controls the highlight color used for Firefox menus? ... like Find, Print and About ... the main menus.
    I used the Stratiform Plug-in to change my font color to blue and now it's exactly the same as the highlight color ... so highlighting makes the entry's text invisible.
    I want my highlight color to be YELLOW only, regardless of any theme I might use.

    Good idea ... but (in XP) the color for Selected Items only affects Windows menu entries. It looks like some other setting affects the Firefox ones. I've attached a couple of captures to show what I'm seeing.
    Thanks for trying.

Maybe you are looking for

  • Error on trying to do the JDeveloper's Tutorial (9.0.3.1)

    On trying to do the Tutorial of JDeveloper 9.0.3, in the chapter "Business Components Programmatic Client Tutorial - Step 3: Finding and Displaying Data by Primary Key", when is ran the Batch.class, the following errors are displayed: D:\Jdev9031\jdk

  • Can't filter by VIEW_TYPE = 'CALC' from SYS.VIEWS in rev. 23

    Hi all! Trying to select:   select * from views where view_type='CALC' Getting the following error: Could not execute 'select * from views where view_type='CALC'' SAP DBTech JDBC: [2]: general error:  case(Boolean, BigInt, Boolean, NLocator)   Candid

  • Inability to accept avi files in Version 9.

    I run Version 9 of Premiere Elements.  My camera records in avi.  Elements does not import so that I can make one movie from 12 ndividual files.

  • Upgrading OBIEE to higher version

    I have intalled OBIEE version 10.1.3.3.0 and now as newer version is available,I want upgrade to 10.1.3.3.2. I have already created Reports in older version. please guide that how should I migrate to higher version.. so that i can use my old reports,

  • MS Dynamics and Silverlight

    I am trying to submit a support request on www.microsoft.com/dynamics website. When I click the button to start the request I am greeted with a box that says I need to install Silverlight. If I click OK to install Silverlight it will download the Sil