Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » e(fx)clipse » Proper way to find a model element with CSS selector?
Proper way to find a model element with CSS selector? [message #1794183] Mon, 27 August 2018 03:05 Go to next message
Marcelo Ruiz is currently offline Marcelo RuizFriend
Messages: 80
Registered: April 2017
Member
Hi everyone,
I am having trouble trying to apply a custom style to one of the components in my model.
I have a Handled Tool Item with Id: my.toolbar.element within a Toolbar, but I am not able to write the right selector for it.

What I would like to achieve is to find my.toolbar.element and change its background to red.

I can find the part with the class selector with no problem:
.MToolBarElement {
    --fx-background-color: red;
} 

but I cannot use Id selector:
#my-toolbar-element {
    --fx-background-color: red;
}

nor use:
.MToolBar > #my-toolbar-element {
    --fx-background-color: red;
}

I know I am missing something, but I cannot figure it out. Also, I tried to find an example for my case online but I could not find anything relevant. Any help will be appreciated!
Thank you!
Re: Proper way to find a model element with CSS selector? [message #1794320 is a reply to message #1794183] Wed, 29 August 2018 00:45 Go to previous message
Marcelo Ruiz is currently offline Marcelo RuizFriend
Messages: 80
Registered: April 2017
Member
I am going to answer myself in case someone else has the same problem. The solution was actually rather simple:
.#my-toolbar-element {
    --fx-background-color: red;
}

I still can't figure out myself why I didn't try that before!
Anyway, sorry for the trivial question post...


Previous Topic:Current recommendations for dialogs (and wizards)
Next Topic:How can I customize how default elements are rendered?
Goto Forum:
  


Current Time: Sat May 04 18:49:32 GMT 2024

Powered by FUDForum. Page generated in 0.02825 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top