Background color in MarvinView

User 870ab5b546

22-08-2005 17:48:16

I have a jsp file with the following script:





Code:



<script LANGUAGE="JavaScript1.1">


         //marvin_jvm="builtin"; // "builtin" or "plugin"


         //marvin_gui="awt"; // "awt" or "swing"


         mview_name="ans_applet";


         //marvin_signed="false";


         mview_begin("/nosession/marvin", 350, 350); // arguments: CODEBASE, WIDTH, HEIGHT


         //mview_param("detach","hide");


       mol = opener.getMol_opwxslmqquvhktn();


         mview_param("mol",mol);


         mview_param("atomMappingVisible","false");


         mview_param("background","FFFFFFFF");


         mview_param("rendering","wireframe");


         mview_end();


</script>








But the background color is always black, regardless of what I set the parameter to. The other parameters work fine to change the defaults. Any suggestions? Am I doing something wrong?





And what is molbg, and how is it different from background?

ChemAxon a3d59b832c

23-08-2005 09:38:12

Bob,





Tamas is on holiday at the moment, but I try to help you. You can see the difference between background and molbg on this example:





http://www.chemaxon.com/marvin/doc/dev/example-sketch1.2.html





So molbg sets the canvas color and background is everything else. For your mview applet I guess only the canvas is visible, that's why setting background makes no difference.





I hope this is helpful.





Best regards,





Szabolcs

User 870ab5b546

23-08-2005 12:25:26

Ahhhh....





All is now clear.





On the page http://www.chemaxon.com/marvin/doc/dev/sketchman.html, and wherever you define these two parameters, a better description of these two parameters is that molbg sets the canvas color, and background sets the background color for the buttons.

ChemAxon a3d59b832c

23-08-2005 13:27:34

Good idea. We will update the documentation.





Thanks.





Szabolcs