Change the Listcell default color when it is flown over mouse

How can I change the listcell default color when the mouse is flown over TI (light blue) than when it is selected (dark blue)?

You must provide your own style for her.

Add a style.css of your classpath and add it to your scene.

scene.getStylesheets().add("/my_style.css");

This style sheet, you need to override the default value.

Here is the default:

.list-cell:odd {
    -fx-background-color: derive(-fx-control-inner-background,-5%);
}

.list-view:focused .list-cell:focused {
    -fx-background-color: -fx-focus-color, -fx-cell-focus-inner-border, -fx-control-inner-background;
    -fx-background-insets: 0, 1, 2;
}

.list-view:focused .list-cell:focused:odd {
    -fx-background-color: -fx-focus-color, -fx-cell-focus-inner-border, derive(-fx-control-inner-background,-5%);
    -fx-background-insets: 0, 1, 2;
}

/* When the list-cell is selected and focused */
.list-view:focused .list-cell:filled:focused:selected {
    -fx-background-color: -fx-focus-color, -fx-cell-focus-inner-border, -fx-selection-bar;
    -fx-background-insets: 0, 1, 2;
    -fx-background: -fx-accent;
    -fx-text-fill: -fx-selection-bar-text;
}

.list-view:focused .list-cell:filled:selected, .list-view:focused .list-cell:filled:selected:hover {
    -fx-background: -fx-accent;
    -fx-background-color: -fx-selection-bar;
    -fx-text-fill: -fx-selection-bar-text;
}

.list-view:focused .list-cell:filled:focused:selected:hover {
    -fx-background: -fx-accent;
    -fx-background-color: -fx-focus-color, -fx-cell-focus-inner-border, -fx-selection-bar;
    -fx-background-insets: 0, 1, 2;
    -fx-text-fill: -fx-selection-bar-text;
}

/* When the ListView is _not_ focused, we show alternate selection colors */
.list-cell:filled:selected:focused, .list-cell:filled:selected, .list-view:horizontal .list-cell:filled:selected {
    -fx-background-color: lightgray;
    -fx-text-fill: -fx-selection-bar-text;
}

.list-cell:filled:selected:focused:disabled, .list-cell:filled:selected:disabled {
    -fx-opacity: -fx-disabled-opacity;
}

.list-cell:filled:hover {
    -fx-background-color: -fx-cell-hover-color;
    -fx-text-fill: -fx-text-inner-color;
}

.list-view:focused .list-cell:filled:focused:hover {
    -fx-background-color: -fx-focus-color, -fx-cell-focus-inner-border, -fx-cell-hover-color;
    -fx-background-insets: 0, 1, 2;
    -fx-text-fill: -fx-text-inner-color;
}

.list-view:horizontal .list-cell:filled:selected, .list-view:horizontal .list-cell:filled:selected:hover {
    -fx-background-color: linear-gradient(to right, derive(-fx-accent,-7%), derive(-fx-accent,-25%));
}

You probably want to only replace

.list-cell:filled:hover {
    -fx-background-color: -fx-cell-hover-color;
    -fx-text-fill: -fx-text-inner-color;
}

and the background color value

-fx-Backgrounder:-fx-focus;
-fx-background-color:-fx-selection-bar;

You must understand, the optimal style yourself.

Tags: Java

Similar Questions

  • How I change the fonts and colors of default return?

    I changed the font and the color of the text through the Tools button and the button options and the tab content. I can't find anything tell me how to change the fonts and colors to the colors and fonts by default. Can you advise me? I use Windows 7 Home Premium OS. Thank you.

    Hi Brenda19605,

    You can use this article to set the fonts and colors: https://support.mozilla.org/en-US/kb/change-fonts-and-colors-websites-use?esab=a & s = do & r = 0 & s = as

    The default settings for the police are in this article:
    https://support.Mozilla.org/en-us/KB/some%20text%20shows%20up%20bold%20after%20upgrade

    Unfortunately for the default color has no good reference. For the text, but it is black (most lower-left), the background is white (color above left). Unvisited links is blue (column 8, line 5) and the visited link is purple (column 9, line 5).

    Let me know if you need help more!

    Lordfreak

  • Change the selection highlight color

    The default color when a cell or item is selected is a light cyan. On my computer, it is very difficult to discern the text because cyan light highlight color and white text are scrambling. How can I adjust the highlighting/selection color so that the text is readable?

    In fact, the color of the selected item is determined by your operating system. For editing in Windows XP:

    Right-click on your desktop
    Properties
    Appearance tab
    Advanced
    Point of fall down: has chosen "selected items".
    Change the color to what you want

  • Failed to create the Direct3D device. try to change the resolution or color depth

    When I try to open the game this message is impossible to create the device come direct3d. try to change the resolution or color depth
    Please help me

    Hello

    1. what game are you talking about?

    2. have there been recent changes to the computer before the show?

    I suggest to follow the steps provided and check if it helps.

    DirectDraw or Direct3D option is unavailable: http://support.microsoft.com/kb/191660

    DirectX: Description of the DirectX Diagnostic tool: http://support.microsoft.com/kb/190900/en-us

    Hope this information is useful.

  • You cannot change the appearance and color of the taskbar

    Original title: appearance

    I don't really know how to explain it, but I have windows vista, and I can't change the appearance, because he seems to have returned to the base? On my guest account, it works, and I can change the appearance and color of the taskbar, but not on my main account. And even when you're on the internet, the X has changed and is smaller than usual. Anyway to fix it?

    See if your themes service is running:

    Start-> in the box, type start search, services.msc and press enter-> go to the bottom and double click on themes. In the properties of themes, the startup type: must be set to automatic. In the State Service click Start, if it is not started. You may need to restart.

    I hope I could help

  • How to change the programs that load when Windows starts

    In simple terms... How to change the programs that load when Windows starts?  Because my boot time is slow in arriving at my login screen!

    Download and run the "Autoruns" from Microsoft Sysinternals freeware:

    < http://technet.microsoft.com/en-us/sysinternals/bb963902="">

    It lists all programs that start at startup and allows you to disable it by simply removing a check mark.  This makes it easy to reverse in case something goes wrong.

    HTH,
    JW

  • I made a table. How to add links to the cells/rows without changing the font or color

    I use DW of CS3. I made a table (with 8 lines in a single column) inside a box of AP div.  I love the fonts and colors and now I want to add links to each cell in the row /? If I select text and add a link in the properties panel, change the font and color, which I don't want. I want the paintings to look like they do, but for each cell to be clickable as a link. This should be very simple, but I can't seem to find the answer in the help of Dream Weaver.

    jonabark wrote:

    I love the fonts and colors and now I want to add links to each cell in the row /? If I select text and add a link in the properties panel, change the font and color, which I don't want. I want the paintings to look like they do, but for each cell to be clickable as a link. This should be very simple, but I can't seem to find the answer in the help of Dream Weaver.

    Try to put the following code in the head of your page to see if it makes all the difference:

    If you use a separate external style sheet, then you only need something like this:

    a {}

    Color: inherit;

    text-decoration: none;

  • How to change the tooltip background color in Adobe Acrobat Reader? - ...

    How to change the tooltip background color in Adobe Acrobat Reader? - ...

    Hi xiaolaq75134938,

    I'm sorry, it is not possible to change the background color of the ToolTip, it is a design behavior.

    Kind regards
    Nicos

  • How to change the size and color of 'staticText '?

    Can anyone share please how to change the size and color of the object "staticText"?

    function buildUI (thisObj) {}

    var myPanel = (thisObj instanceof Panel)? thisObj: new window ('pallet', 'Gear of Stress', undefined, {resizable: true});

    var txt is myPanel.add ("staticText", [0,0,100,20], "txt");.

    txt. newFont, fontSize, color?

    Return myPanel;

    }

    var myToolsPanel = buildUI (this);

    I did a quick test on a PC at the office and it seems that Gill without isn't a stock PC police. You could comment on these out or change them to a police stock as Helvetica or something. Once I removed that it has launched on PC very well.

  • I want to change the size and color of the text in the call boxes and text boxes. How can I do this? Jack

    I want to change the size and color of the text in the call boxes and text boxes. How can I do this? Jack

    Highlite the text inside the text box and press Ctrl + E.

  • Can I change the preview background color?

    Hello

    Can I change the preview background color?

    It is gray, can I change it?

    Thank you

    I use bridge cs6

    Thank you

    I have clearer or lighter in the background

    but I can't put gray 18% or tweak like photoshop

  • I need to change the background image often when running

    any body help me,.

    I need to change the background image often when running

    concerning

    welcan

    Hello

    You can also use effects rather than a timer, much more enjoyable... following example moves between a series of embedded images.

    David.

    http://gumbo.flashhub.NET/menu/ source included

  • My wireless mouse just stopped working. I can still use the mousepad however. I changed the batteries does not. Then I tried another mouse wireless, and it didn't work either.

    My wireless mouse just stopped working.  I can still use the mousepad however.  I changed the batteries does not.  Then I tried another mouse wireless, and it didn't work either.  What can I do next?

    Buy an inexpensive wired USB mouse for less than $5 and see if it works.  As far as I'm concerned wireless mice are more trouble than they are worth.  YMMV :-)

    Good luck.

  • How to change the application background color dynamically

    Hi all

    In my project, I'm loading the user roles and rights-based mxml components. For each mxml component, I used different colors and displaying the component in the Center screen.

    as
    If the User Password [background color = blue] I'm component loading, managing partner
    If the seller [backgound color = green] = user I'm loading component related vendor and etc..,.

    My main.mxml application is background is different [default]
    When I insert the component it must reflect the color [change the background color] in main.mxml application. How can I achieve this

    I found the solution. ;)

    [code]
    private void LoadComponent(licensetype:String):void
    {
    var screen: UIComponent;
    switch (licensetype)
    {
    case 'Manager': / / Load Manager Component
    screen = new Manager();
    addChild (screen);
    this.setStyle('backgroundColor','#9E9A41');
    break;
    case 'Seller': / / load SellerComponent
    screen = new Seller();
    addChild (screen);
    this.setStyle('backgroundColor',"#408080");
    break;
    by default:
    default display screen with information
    break;
    }
    }
    [/ code]
    :)

  • can't change color on visited sites without changing the background /foreground colors that hide options on the sitec

    I want to change the color of the visited sites, but am forced to put background and foreground colors that don't properly
    display all colors for controls etc. on many sites.
    I uncheck the button Allow pages to choose their own colors...
    Google is a good example, after doing a search, then went to change the color of sites, uncheck the allow pages button and then you don't see the research and most of the options button in the upper right corner in google.

    I'm a little colorblind, can not differentiate the blue and purple for links on sites visited...

    THX

    I think the problem is that many sites use background colors to create buttons, so you lose when you override the colors of the page.

    Perhaps you could use an add-on to refine the colors instead of the parameter of type all or nothing Firefox. I found a few extensions that say they can change the colors of the page, but I've not tried it myself:

    For a truly personalized approach of colors, links, there are two ways of general use to apply your own style rules to specific sites: the stylish extension and a file userContent.css. You must define a background color preferred text and for links visited and unvisited so that you're sure to be able to read the text.

    I hope that one of them fits the Bill!

Maybe you are looking for

  • HP Pavilion HPE h8 - 1287c: looking to update the graphics card in my HP Pavilion HPE h8 - 1287c

    I'm looking to upgrade the graphics card in my HP Pavilion HPE h8 - 1287c. I recently installed a Cosair CX600w diet and I'm looking for a list of compatible video cards, I can update.  My first interest is to do video editing, so I need memory and g

  • Acquire 2 digital signal of custom scale (Engg units)

    I am a newbie to the world of DIO. I write a VI to acquire 2 digital signals. one of a load cell and others for engine rpm (legumes). I need acquire these two signals and then convert them to engg units using the custom scale and write it in a txt fi

  • Windows Update error 0 X 80244019 in WinXP SP2

    do a rebuild of my dual boot Win XP and Win7 system - must have a software that can be run on Windows XP. try to get updates, but the site 'Encountered a problem' and get the above error code. Can not use the fixit tool as it is to the SP2-tool requi

  • How can I get plug-ins windows media services?

    mistake my netscape browser lacks microsoft plug-ins windows media services You have problems with programs Error messages Recent changes to your computer What you have already tried to solve the problem

  • Access a class later?

    I have my own class BBM I create hand: BbmConnection *bbmConnection = new BbmConnection(uuid, &app); bbmConnection->RegisterApplication(); How can I use this class later in my application, in another class? I can't reintialise it because I don't know