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

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;}
    }

  • WD:ABAP  change lead selection

    Hi all,
    I  need to change the lead selection according to a particular table column.  The lead selection is set to the first row of the table.  The table has some input fields which already contain values.  If the user changes the value of the input field in any row, the lead selection has to be changed to that row of the table without having to select that row.  I wrote the code in  onEnter event of the table, but it is returning the values of the first row that has the lead selection.  How do I change it? It would be helpful if u could please post the code too.
    Thanks,
    Sravanthi

    Hi,
    You can change it in ModifyView method. You can use setLeadSelection method.
    Regards,
    Parminder

  • Change lead selection in dropdown by key

    Hi,
    I am using dropdown by key in one of my application.
    I am getting some values by calling a FM.FM
    returning me a table . My context for the dropdown is from the structure of the table.
    --drpplan(node)
      ---code -(attribute)
      -- desc-(attribute)
    I am binding the values from the table to the node info and to code attribute to populate the dropdown by key.
    It is working fine.
    My requirement is when user selects some thing from dropdown corresponding description should show in a textview.
    If I used a dropdown by key I know I dnt have write any code for this as the lead selection autometically changes. How to do this in dropdown by key.
    I konw I can write in the onselect method, call the FM again and read the table  with sected key and set the value.
    But in this approch I am calling FM twice hitting the db again.
    Is there any other way out. ?
    Thanks,
    Prosun

    u can store the data in an internal table when the FM is 1st called.
    And retrieve the describtion at  selection event.

  • 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

  • Why does GET_STATIC_ATTRIBUTES or SET_STATIC_ATTRIBUTES change lead selecti

    I loop over all elements of a context node, and change some attributes.
    The code looks like this:
          LOOP AT lt_element_list INTO lo_el_element.
            lo_el_element->get_static_attributes( IMPORTING static_attributes = ls_element ).
            ls_element-created_by_name  = get_user_name( iv_user_id = ls_element-created_by ).
            ls_element-changed_by_name  = get_user_name( iv_user_id = ls_element-changed_by ).
            lo_el_element->set_static_attributes( EXPORTING static_attributes = ls_element ).
          ENDLOOP.
    This coding seems to change the the lead selection of the context node, which leads to problems somewhere else.
    Why does it change the lead selection and how can I prevent it?

    hi daniel.....
             i dont think there is a need for looping in this manner.
             you just get all the values of a node into an internal table.
             and then loop the internal table an make changes in it.
             then clear the node and pass this currently changed internal table into the node.
              the lead selection changes because you are setting the attribute and it might be stored in index 1 or the to the index where the lead selection is referred to. this might be your problem.
    ---regards,
       alex b justin

  • 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 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 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;

  • 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
    >

  • 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();
    }

  • Roadmap : color change of selected step

    Hi All,
            I am using roadmap in my application.... but in that when my step changes,then its color does not change i.e. i am not able to differentiate the selected step from the rest of steps.
           I have binded the selected step property with the context node.
          Thanks in advance...

    Hey Vishal these r the steps ,
    1.Define a node with attributes Step & Next Step.
    2.When ever you click on next Button , in event handler call this method .
    wd_Comp_Controller->Continue(  ).
    3. In Method Continue() code this.
    Node_Roadmap = wd_Context->get_Child_Node( Name = IF_COMPONENTCONTROLLER=>wdctx_Roadmap ).
    * get element via lead selection
      Elem_Roadmap = Node_Roadmap->get_Element(  ).
    * get single attribute
      Elem_Roadmap->get_Attribute(
        exporting
          Name =  `STEP`
        importing
          Value = Item_Step ).
    CASE Item_Step.
    **Set Next step
    When 'STP_DIMENSION'.
    Stru_Roadmap-STEP = 'STP_INPUT'.
    Stru_Roadmap-NEXT_ENABLED = abap_true.
    *set next step
    When 'STP_INPUT'.
    Stru_Roadmap-STEP = 'STP_RESULT'.
    Stru_Roadmap-NEXT_ENABLED = abap_false.
    When others.
    Stru_Roadmap-NEXT_ENABLED = abap_false.
    Endcase.
    Node_Roadmap->set_static_attributes( Stru_Roadmap ).
    wd_this->fire_navigate_evt( Stru_Roadmap-STEP  ).

  • How do I change the text color of footers on select pages? (InDesign CS6)

    Good afternoon,
    Months ago, I worked with a graphic designer to put together a 100-page workbook for my training company. He turned all of the files over to me and I'd like to make a small change before we print another run for a new client. Specifically, I'm having trouble changing the text color on select pages. Since a picture says 1,000 words, let me give you an example:
    As you can see, the copyright information on the right side of the page is difficult to read here when placed over the photo (you may have to look closely, but it's along the guy's sleeve). What I'd love to do is change that part of the footer (not the left, page number side) to white text. This would make it quite a bit easier to read. There's a number of other pages in the book that I want to make this change to. I'm not sure why I never noticed it or mentioned it to the designer. I suppose I've become more discerning since then.
    Let me tell you what I've tried to do:
    I learned how to override master pages by CTRL+SHIFT clicking on the footer. However, this has not worked for me. It allows me to change the page number part, but not the copyright side. Additionally, sometimes when I override the master the formatting of the footer goes goofy. For instance, the left side and right side come together and end up in the middle of the page I'm working on.
    I'm looking for a quick way to go through and make the footers easier to read on pages where they are backed by a photo. Hoping you can help me. Please let me know if you need any other information.
    Best,
    Taylor

    I think you should have left it as it was. It seems like what you had was single pages flowing as spreads within InDesign. Like below. That is the correct way, and when you changed it to all single, it did create your footer problems.
    Will you be sending the file as a PDF to your online printer? If so, then leaving the InDesign file set as below is fine. The PDF output will separate the pages.
    All you have to do is make sure that Pages, not Spreads, is chosen when you output the PDF

  • How to change the default color of the selected row

    hi all,
    I need to know how to change the default color(yellow) of the selected row in a table component.whether i need to change anything in the stylesheet.If so, where should i make the changes in the stylesheet.
    thanks and regards,
    rpk

    The chart colors are being referred to *'palette.cxml'* file in these directories
    BI_HOME\web\app\res\s_oracle10\chartsupport
    BI_HOME\oc4j_bi\j2ee\home\applications\analytics\analytics\res\s_oracle10\chartsupport
    you can change to your custom colors.
    Restart OC4J and PS to make the new ones work..
    Regards,
    Raghu

Maybe you are looking for