Page 1 of 1

CSS Stylesheet

Posted: Fri Jun 28, 2019 10:31 am
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

Re: CSS Stylesheet

Posted: Fri Jun 28, 2019 2:16 pm
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