CSS Stylesheet

Just starting out? Need help? Post your questions and find answers here.
saboteur
Posts: 27
Joined: Mon Jan 08, 2018 10:25 am

CSS Stylesheet

Post by saboteur »

Hi all,

Is there a list of all styles that can be set with SB. ?

I found some code that allows a custom style to be applied but without knowing what objects are called I can't define them all to my liking

e.g background color foreground color for particular gadget types

Also where is the default stylesheet that is used, as I want to change the background image : i tried changing it in the flat and aeroglass themes but this hasn't worked.

cheers
User avatar
Peter
Posts: 1086
Joined: Mon Feb 24, 2014 10:17 pm
Location: 127.0.0.1:9080
Contact:

Re: CSS Stylesheet

Post by Peter »

Besides the possibility to colorize the windows and gadgets with SetWindowColor() and SetGadgetColor(), there is the possibility to create your own CSS or to adapt an existing CSS to your needs (assuming you have the necessary knowledge).

The path for the Window-CSS is:
[PathTo]\SpiderBasic\Libraries\javascript\themes\

The path for the Gadget-CSS is:
[PathTo]\SpiderBasic\Libraries\javascript\dojo\themes\

It is best to copy an existing CSS folder and rename it.

In the compiler options you can select this folder after restarting the IDE.

Last, but not least: As a quick'n dirty hack it is also possible to inject your own CSS at runtime:

Code: Select all

! var style = "<style type='text/css'>" + 
!             " html { background : green !important ;}" + 
!             "</style>"
! $(style).appendTo("head");
Greetings ... Peter
Post Reply