Custom Properties Per Block?

Hi,

I’m not sure that this is possible, but thought that I should ask anyway, just in case anybody on here has managed to do it.

I have a control form which contains several blocks. Ideally I would like to add some custom code to change the background colour or add a background image to each individual block on the form. Is this possible and has anybody done it?

Thanks,

Mike Wilcock
TSM Limited

Re: Custom Properties Per Block?

Hi,

I managed to figure it out, so just in case this is of use to anybody else here goes…

Each block that you create in Scriptcase is created inside a div called #div_hidden_blocco_X with x being the number of the block starting at zero (#div_hidden_blocco_0, #div_hidden_blocco_1 etc.).

Once you know this it is then a simple case of adding some css code like the following…

echo “<style type=‘text/css’>#div_hidden_bloco_1 { background-color: #e2e3e4; background-image:url(’…/_lib/img/sys__NM__imagename.png’) }</style>”;

to the onApplicationInit event of your control form and hey presto your block is completely customisable.

Regards,

Mike

1 Like

This was just what I was looking for - but now in 2014 with SC 7 or 8, it looks like those blocks have been ajax-ified (your suggested CSS echo has no effect) - in which case, any idea where or how this can now be achieved?

:slight_smile: