Setting a default stylesheet for a custom control
tbee at tbee.org
Tue Jan 27 23:59:24 UTC 2015
Indeed. There are more than enough examples to look at and copy from :-)
On 27-1-2015 23:30, Jonathan Giles wrote:
> If I'm correctly understanding your question, you want to override the getUserAgentStylesheet() method inside your Control class. In here you'll simply return the CSS file that is being used to style your custom control.
> I'm also aware there are some issues (with CSS error messages being printed to the console) in certain releases (8u20). If you run into these, ping me and I'll give you some pointers.
> -- Jonathan
> On 28/01/2015 11:24 a.m., Pedro Duque Vieira wrote:
>> I'm developing a custom control, in the process I've used CSS to define its
>> Now I want to make this control available for use by any developer, so I
>> want this control to have a default stylesheet which is the one I've used
>> to create the control much like javafx controls have a default stylesheet
>> (modena or caspian).
>> How can I do this?
>> I still want to make it possible for any user of my control to override the
>> css styles that the "default" stylesheet defines.
More information about the openjfx-dev